Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Quest 2 VR camera rotation recording

Discussion in 'VR' started by apaul, Nov 1, 2022.

  1. apaul

    apaul

    Joined:
    Jun 24, 2013
    Posts:
    8
    I am trying to record the head rotation of a person wearing an Oculus Quest 2 headset. I am using the OVRPlayerController and the built-in OVRCameraRig >> CenterEyeAnchor to capture the data in real time. I am using the following lines of code to capture the rotation on each axis i.e., .x for the x axis -

    Camera.main.transform.rotation.eulerAngles.x
    Camera.main.transform.rotation.eulerAngles.y
    Camera.main.transform.rotation.eulerAngles.z

    I am a bit confused if this is fundamentally the correct approach to capture the head rotation data from the VR headset. Any help is highly appreciated as it is important to get this right for my study.



     
    Last edited: Nov 1, 2022