Skip to main content
May 31, 2018

how to track headset rotation/tilt?

i am trying to track the rotation/tilt of the vr headset, and preform an action depending on the distance of the tilt after pushing in a button on the controller.

lets say you press in a button on the controller and then tilt your head forward. i need to track the difference of the head tilt along the x axis from 0 to however far they tilt from the time they press in the button to when they release.

so i am thinking something like this:

get default/even/non-tilted rotation and set a value of 0
bool triggerPressed = OVRInput.Get(OVRInput.Button.PrimaryIndexTrigger);

if (triggerPressed){
   then track the tilt/rotation difference on x axis and the same for y axis
   if (the x > 0){
       do something
   }
   if (the x < 0){
       do something else
   }
}

i probably messed up the syntax there but you get what i mean. anyone have any idea how to track that tilt? 
This topic has been closed for replies.

3 replies

New Participant
June 28, 2018
Hi @imperativity

I am trying to track the rotation/orientation on the Oculus Go, is there any documentation on how to do this?
April 8, 2020

jolaya said:

Hi @imperativity

I am trying to track the rotation/orientation on the Oculus Go, is there any documentation on how to do this?


i was overthinking it and now i feel dumb. you dont need to find the "headset" rotation. the main camera is the same rotation as the headset. and that transform accessible 
New Participant
April 10, 2020
You can look up or down, to either side, or tilt your head.