Search Unity

Mock HMD returns zero for left/right eye

Discussion in 'AR/VR (XR) Discussion' started by zezba9000, Mar 23, 2019.

  1. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    992
    I have two cameras in my scene (one set up to render different stuff in each eye).
    However I can't get the eye offsets in my "OnPreRender" method called per eye.

    InputTracking.GetLocalPosition(XRNode.LeftEye) returns a Vector3.Zero value.
    I'm using a Mock HMD. Is this a bug in the mock hmd? Am I missing something?

    Win10, x64, Unity3D 2018.3.9
     
  2. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    Well, not sure why you're using the mock hmd.

    but as per the other thread. thats likely a bug.
     
  3. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    992
    Using a mock hmd because its much faster to prototype effects without having to put on an HMD each time you want to test something in VR. Or if you're on a laptop, etc. I didn't have one hooked to the PC I was on.

    I will validate the bug only happens with Mock HMDs and make a bug report when I get a chance.
     
  4. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,357
    Same here, plus i dont own a VR headset and would like to test how rendering is done in VR - XR, is there any way to get left - right camera positions and feed them to our image effects for example ?

    Thanks
     
  5. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,357
    It is a way to test VR for shaders etc without a device, so very useful.
     
  6. KuanMi

    KuanMi

    Joined:
    Feb 25, 2020
    Posts:
    41
    The same result, is there any other way to get the position of the left and right eyes? I really don't want to wear a headset every time.