Search Unity

Question Oculus Quest 2: Getting the position of the controllers relative to the headset

Discussion in 'VR' started by Lukas-Barbarossa, Mar 22, 2021.

  1. Lukas-Barbarossa

    Lukas-Barbarossa

    Joined:
    Jul 14, 2012
    Posts:
    3
    Hi.

    I want to be able to test the relative position of the Quest 2 controllers relative to the headset

    I know I can get the position of controllers using

    OVRInput.GetLocalControllerPosition(OVRInput.Controller.RTouch);
    OVRInput.GetLocalControllerPosition(OVRInput.Controller.LTouch);


    but I don't know how to get the position of the headset. I have looked through the OVRInput class and can't find it there.

    Is there a method that returns the relative position between the 2 perhaps?
     
    Last edited: Mar 22, 2021
  2. saranghaedeun

    saranghaedeun

    Joined:
    Sep 19, 2022
    Posts:
    1
    i also wondering how to know get the position of the headset.
     
  3. vkapoor

    vkapoor

    Joined:
    Jan 1, 2022
    Posts:
    24
    You can use Camera.main.transform.position for head position I think.