cancel
Showing results for 
Search instead for 
Did you mean: 

Non-Camera relative movement with the OVRPlayerController

olas72
Level 2
So it looks like its coming from this code.   But maybe I'm just looking in the wrong place.   I want the movement to always go in the same direction regardless of head orientation.  Any ideas would go a long way.   Thank you.

OVRPlayerController.cs

moveInfluence = Acceleration * 0.1f * MoveScale * MoveScaleMultiplier;

            if (primaryAxis.y > 0.0f)
                MoveThrottle += ort * (primaryAxis.y * transform.lossyScale.z * moveInfluence * Vector3.forward);

            if (primaryAxis.y < 0.0f)
                MoveThrottle += ort * (Mathf.Abs(primaryAxis.y) * transform.lossyScale.z * moveInfluence *
                                       BackAndSideDampen * Vector3.back);

            if (primaryAxis.x < 0.0f)
                MoveThrottle += ort * (Mathf.Abs(primaryAxis.x) * transform.lossyScale.x * moveInfluence *
                                       BackAndSideDampen * Vector3.left);

            if (primaryAxis.x > 0.0f)
                MoveThrottle += ort * (primaryAxis.x * transform.lossyScale.x * moveInfluence * BackAndSideDampen *
                                       Vector3.right);  

moveDirection += MoveThrottle * SimulationRate * Time.deltaTime;

      Controller.Move(moveDirection);
0 REPLIES 0