protected override void UpdateTeleportDestination()
    {
        var direction = OVRInput.Get(Thumbstick == Thumbsticks.LeftThumbstick
                        ? OVRInput.RawAxis2D.LThumbstick
                        : OVRInput.RawAxis2D.RThumbstick);

        if (!AimData.TargetValid)
        {
            _lastValidDirection = new Vector2();
        }

        var length = direction.magnitude;

        if (length < RotateStickThreshold)
        {
            direction = _lastValidDirection;
            length    = direction.magnitude;

            if (length < RotateStickThreshold)
            {
                _initialRotation = LocomotionTeleport.GetHeadRotationY();
                direction.x      = 0;
                direction.y      = 1;
            }
        }
        else
        {
            _lastValidDirection = direction;
        }

        var tracking = LocomotionTeleport.LocomotionController.CameraRig.trackingSpace.rotation;

        if (length > RotateStickThreshold)
        {
            direction /= length;             // normalize the vector
            var rot = _initialRotation * Quaternion.LookRotation(new Vector3(direction.x, 0, direction.y), Vector3.up);
            _currentRotation = tracking * rot;
        }
        else
        {
            _currentRotation = tracking * LocomotionTeleport.GetHeadRotationY();
        }

        LocomotionTeleport.OnUpdateTeleportDestination(AimData.TargetValid, AimData.Destination, _currentRotation, GetLandingOrientation(OrientationMode, _currentRotation));
    }
    protected override void UpdateTeleportDestination()
    {
        float   magnitude;
        Vector2 direction;

        if (Thumbstick == OVRInput.Controller.Touch)
        {
            Vector2 leftDir  = OVRInput.Get(OVRInput.RawAxis2D.LThumbstick);
            Vector2 rightDir = OVRInput.Get(OVRInput.RawAxis2D.RThumbstick);
            float   leftMag  = leftDir.magnitude;
            float   rightMag = rightDir.magnitude;
            if (leftMag > rightMag)
            {
                magnitude = leftMag;
                direction = leftDir;
            }
            else
            {
                magnitude = rightMag;
                direction = rightDir;
            }
        }
        else
        {
            if (Thumbstick == OVRInput.Controller.LTouch)
            {
                direction = OVRInput.Get(OVRInput.RawAxis2D.LThumbstick);
            }
            else
            {
                direction = OVRInput.Get(OVRInput.RawAxis2D.RThumbstick);
            }
            magnitude = direction.magnitude;
        }

        if (!AimData.TargetValid)
        {
            _lastValidDirection = new Vector2();
        }

        if (magnitude < RotateStickThreshold)
        {
            direction = _lastValidDirection;
            magnitude = direction.magnitude;

            if (magnitude < RotateStickThreshold)
            {
                _initialRotation = LocomotionTeleport.GetHeadRotationY();
                direction.x      = 0;
                direction.y      = 1;
            }
        }
        else
        {
            _lastValidDirection = direction;
        }

        var tracking = LocomotionTeleport.LocomotionController.CameraRig.trackingSpace.rotation;

        if (magnitude > RotateStickThreshold)
        {
            direction /= magnitude;             // normalize the vector
            var rot = _initialRotation * Quaternion.LookRotation(new Vector3(direction.x, 0, direction.y), Vector3.up);
            _currentRotation = tracking * rot;
        }
        else
        {
            _currentRotation = tracking * LocomotionTeleport.GetHeadRotationY();
        }

        LocomotionTeleport.OnUpdateTeleportDestination(AimData.TargetValid, AimData.Destination, _currentRotation, GetLandingOrientation(OrientationMode, _currentRotation));
    }
 protected override void InitializeTeleportDestination()
 {
     _initialRotation    = LocomotionTeleport.GetHeadRotationY();
     _currentRotation    = _initialRotation;
     _lastValidDirection = new Vector2();
 }