Search Unity

Oculus Rift proximity sensor

Discussion in 'AR/VR (XR) Discussion' started by IvanTesseract, Apr 4, 2018.

  1. IvanTesseract

    IvanTesseract

    Joined:
    Jul 1, 2013
    Posts:
    109
    Hey guys,

    I am using Unity 2017.1.0f3 and I have a problem with detecting when the Oculus Rift has been taken off even though it has a proximity sensor. I want this because I want to build a screensaver when the Oculus is not active.
    I've set the app to run in the background because if not the Oculus simply paused it.

    I was trying to use VRSettings.isDeviceActive, but it does not seem to work.

    Thank you in advance all.
     
  2. jackpr

    jackpr

    Unity Technologies

    Joined:
    Jan 18, 2018
    Posts:
    50
    I have opened a new case for you here: https://fogbugz.unity3d.com/f/cases/1024312/

    Are you only targeting Oculus? If so, perhaps as a workaround you can find a function in the Oculus SDK that will solve your problem.
     
    IvanTesseract likes this.
  3. williamj

    williamj

    Unity Technologies

    Joined:
    May 26, 2015
    Posts:
    94
    IvanTesseract likes this.
  4. IvanTesseract

    IvanTesseract

    Joined:
    Jul 1, 2013
    Posts:
    109
    Yes, only Oculus. I did find a solution using the Oculus plugin.
    Thanks for your reply.
     
  5. IvanTesseract

    IvanTesseract

    Joined:
    Jul 1, 2013
    Posts:
    109
    The problem was that I needed to solve this for 2017.1.0f3, and if I remember correctly the XR namespace appeared in 2017.3.0. I used the Oculus OVR plugin to get the functionality.

    Thanks for your help.
     
  6. Fangh

    Fangh

    Joined:
    Apr 19, 2013
    Posts:
    274