Skip to main content
New Participant
June 30, 2017

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

    This topic has been closed for replies.