Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
qli43's avatar
qli43
Honored Guest
8 years ago

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!!

1 Reply

Replies have been turned off for this discussion
  • qli43's avatar
    qli43
    Honored Guest


    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?