Forum Discussion
qli43
8 years agoHonored Guest
How to get Oculus headset current rotation without using XR.InputTracking?
Hi there,
I am trying to get the data of headset rotation from a sub-thread in unity. However when I use XR.InputTracking.GetLocalRotation(...), it told me I can only call the function in unity main thread. Is there any way to bypass this problem?
Thanks a lot!!
I am trying to get the data of headset rotation from a sub-thread in unity. However when I use XR.InputTracking.GetLocalRotation(...), it told me I can only call the function in unity main thread. Is there any way to bypass this problem?
Thanks a lot!!
1 Reply
Replies have been turned off for this discussion
- qli43Honored Guest
imperativity said:
Hi,
Welcome to the Oculus Developer Forums.
As you are using Unity, you will benefit greatly from using OVRInput for these types of events. For more information please read the documentation here: https://developer.oculus.com/documentation/unity/latest/concepts/unity-input/
Thank you very much for your kindly suggestion. Oculus utility package for unity did help me a lot. I have read through the OVRInput.cs and I found this script is used to control the Oculus touch. Because I would like to get the headset rotation in quaternion form and I am wondering if there is any function available in the utility package?
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
- 6 months ago
- 2 years ago
- 12 months ago