Forum Discussion
kenter
12 years agoHonored Guest
Camera Y rotation adds rotation force to player?
Hi all, I'm trying to implement something that seems fairly straightforward, but I can't seem to make it work...here it goes... Currently, "Tracker Rotates Y" makes it so that the camera Y rotation...
kenter
12 years agoHonored Guest
I'm away from my work comp but I was thinking of something like this as a possible solution...
Vector3 a = gameObject.camera.transform.rotation.eulerAngles;
float rotationStrength = 0.2f;
float rotationAmount = a.y*rotationStrength*Time.deltaTime; // degrees of rotations per second
Transform b = gameObject.transform.parent.transform;
b.Rotate( 0, rotationAmount, 0);
I would attach it to the OVRCamera Component which would have a gameobject as a parent. I don't need the OVRPlayerController so will remove it... crazy? thoughts?
Vector3 a = gameObject.camera.transform.rotation.eulerAngles;
float rotationStrength = 0.2f;
float rotationAmount = a.y*rotationStrength*Time.deltaTime; // degrees of rotations per second
Transform b = gameObject.transform.parent.transform;
b.Rotate( 0, rotationAmount, 0);
I would attach it to the OVRCamera Component which would have a gameobject as a parent. I don't need the OVRPlayerController so will remove it... crazy? thoughts?
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
- 10 months ago
- 4 years ago
- 9 years agoAnonymous