Forum Discussion
Anonymous
8 years agohow 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?
3 Replies
Replies have been turned off for this discussion
- jolayaHonored GuestHi @imperativity
I am trying to track the rotation/orientation on the Oculus Go, is there any documentation on how to do this? - Anonymous
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 - Walke1rHonored GuestYou can look up or down, to either side, or tilt your head.
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
- 2 years ago
- 2 years ago
- 9 months ago