Forum Discussion
olas72
5 years agoHonored Guest
Non-Camera relative movement with the OVRPlayerController
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
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);
Controller.Move(moveDirection);
moveDirection += MoveThrottle * SimulationRate * Time.deltaTime;
Controller.Move(moveDirection);
Replies have been turned off for this discussion
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago