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.
get default/even/non-tilted rotation and set a value of 0
bool triggerPressed = OVRInput.Get(OVRInput.Button.PrimaryIndexTrigger);
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?
i probably messed up the syntax there but you get what i mean. anyone have any idea how to track that tilt?
