Forum Discussion
luqasona
8 years agoHonored Guest
Oculus get Z-Rotation
Hi Guys,
im actually trying to make a game in unity in which the player moves forward on a cylindric path. I want to use the z-Rotation of the Oculus only so that the player can rotate around this axis by rotating his head. The problem is that the rotation gets very weird when the path turns (around y-axis). My actual code for the Player Rotation looks like this (in update method):
transform.rotation = new Quaternion(transform.rotation.x, transform.rotation.y, OVRCam.transform.rotation.z, transform.rotation.w);
btw im really new to unity and oculus so any help is appreciated
thanks
im actually trying to make a game in unity in which the player moves forward on a cylindric path. I want to use the z-Rotation of the Oculus only so that the player can rotate around this axis by rotating his head. The problem is that the rotation gets very weird when the path turns (around y-axis). My actual code for the Player Rotation looks like this (in update method):
transform.rotation = new Quaternion(transform.rotation.x, transform.rotation.y, OVRCam.transform.rotation.z, transform.rotation.w);
btw im really new to unity and oculus so any help is appreciated
thanks
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
- 10 months ago
- 4 years ago
- 3 years ago
- 2 months ago
- 2 years ago