Forum Discussion
wheatgrinder
10 years agoExplorer
Scale OVRPlayerController
Using Oculus utilities and Unity native VR. I have attached the OVRPlayerController to an empty object. I scale that object to x50 and the view is exactly right. The Keyboard controls seem to hav...
cybereality
10 years agoGrand Champion
There's a missing variable in the gamepad movement calculation.
Line 310 to 320 of OVRPlayerController.cs should look like this:
Basically you just needed to multiply by "transform.lossyScale.z".
Line 310 to 320 of OVRPlayerController.cs should look like this:
if(leftAxisY > 0.0f)
MoveThrottle += ort * (transform.lossyScale.z * leftAxisY * moveInfluence * Vector3.forward);
if(leftAxisY < 0.0f)
MoveThrottle += ort * (transform.lossyScale.z * Mathf.Abs(leftAxisY) * moveInfluence * BackAndSideDampen * Vector3.back);
if(leftAxisX < 0.0f)
MoveThrottle += ort * (transform.lossyScale.z * Mathf.Abs(leftAxisX) * moveInfluence * BackAndSideDampen * Vector3.left);
if(leftAxisX > 0.0f)
MoveThrottle += ort * (transform.lossyScale.z * leftAxisX * moveInfluence * BackAndSideDampen * Vector3.right);
Basically you just needed to multiply by "transform.lossyScale.z".
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
- 9 months ago
- 11 months ago
- 3 years ago