コード例 #1
0
        private void OnEnable()
        {
            if ((inputProvider == null) || (settings == null))
            {
                return;
            }

            UpdateOperatingHeightRange();
            UpdateOperatingTiltRange();
            UpdateTiltFactor();

            if (settings.UseDynamicFieldOfView)
            {
                float t = operatingHeightRange.InverseLerp(CurrentHeight);
                camera.fieldOfView = settings.DynamicFieldOfViewRange.Lerp(settings.EvaluateFieldOfViewTransition(t));
            }

            if (monitorTiltAngleHandle == null)
            {
                monitorTiltAngleHandle = StartCoroutine(RoutineMonitorTilt());
            }

            if (dynamicFieldOfViewHandle == null)
            {
                dynamicFieldOfViewHandle = StartCoroutine(RoutineMonitorFieldOfView());
            }
        }
コード例 #2
0
 private void UpdateTiltFactor()
 {
     tiltFactor = operatingTiltRange.InverseLerp(CurrentTiltAngle);
 }