Search Unity

Oculus presence signal

Discussion in 'AR/VR (XR) Discussion' started by RHoogland, Aug 17, 2016.

  1. RHoogland

    RHoogland

    Joined:
    Jan 24, 2015
    Posts:
    30
    Some games need to run both with Oculus as well as just on screen without an Oculus. A Rift presence signal is necessary in that case.
    I checked the reliability of: isHmdPresent, which is a public static in the OVRmanager. (I checked withe the new Rift)
    I made a very simple script that continuously looks at this signal. The result is always zero, so I can't use it.
    Anyone who knows a more reliable signal for detecting the presence of the Rift ?

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class OculusDetect : MonoBehaviour
    5. {
    6.     public bool presence;
    7.  
    8.     void update()
    9.     {
    10.       presence = OVRManager.isHmdPresent;
    11.      }
    12.  
    13. }