示例#1
0
        private void HandlePitch(Vector3 towardGravity)
        {
            float angle          = Vector3.SignedAngle(Vector3.forward, towardGravity, Vector3.right);
            float relativeAmount = angle / ANGLE_MAX;

            _Pitch.Invoke(RelativeInputEvent.WithinFullRange(relativeAmount));
        }
示例#2
0
        private void HandleYaw(Vector3 towardGravity)
        {
            float angle          = Vector3.SignedAngle(Vector3.down, towardGravity, Vector3.up);
            float relativeAmount = angle / ANGLE_MAX;

            _Roll.Invoke(RelativeInputEvent.WithinFullRange(relativeAmount));
        }
示例#3
0
        public override Vector3 GetPointFromRelativeInput(float relativeInput)
        {
            float internalRelative;

            if (_FullRange)
            {
                internalRelative = RelativeInputEvent.WithinFullRange(relativeInput);
            }
            else
            {
                internalRelative = RelativeInputEvent.WithinPositiveRange(relativeInput);
            }
            return(DeterminePointInSpaceFromRelativeInput(internalRelative));
        }
示例#4
0
        private void NotifyNewInput()
        {
            float value = RelativeInputEvent.WithinFullRange(Curve.Evaluate(_TimeSeconds));

            InputConsumers.Invoke(value);
        }