Search Unity

Oculus Rift: How to detect if Headset is mount or not on user head?

Discussion in 'AR/VR (XR) Discussion' started by cdytoby, Sep 6, 2017.

  1. cdytoby

    cdytoby

    Joined:
    Nov 19, 2014
    Posts:
    181
    Unity 2017.1.1f1

    There are no Unity implementation, so I have to download Oculus Utility, but,

    OVRManager.HMDMounted and HMDUnmounted are not getting called at all.
    OVRPlugin.userPresent doesn't change at all.

    How to get it work?

    And how to NOT disable vr camera when headset is not mounted? my run in background is already true.
     
    Last edited: Sep 6, 2017
  2. thaiwash

    thaiwash

    Joined:
    Dec 19, 2017
    Posts:
    1
    i'm having the same problem..
     
  3. cdytoby

    cdytoby

    Joined:
    Nov 19, 2014
    Posts:
    181
    OK, it's a very old topic and I'm surprised that someone have same issue at current time.
    I solved it myself with new plugin currently, and I used "OVRPlugin.hasInputFocus && OVRPlugin.hasVrFocus" in an Update.

    I made OVRPlugin public.

    Maybe there is better solution.
     
    Thomas-Mountainborn and Alverik like this.