Search Unity

It is possible to check the status of the htc vive?

Discussion in 'AR/VR (XR) Discussion' started by NocSchecter, Nov 3, 2018.

  1. NocSchecter

    NocSchecter

    Joined:
    Aug 19, 2015
    Posts:
    33
    Hello, I have been working with the Oculus for about 2 years and recently I have started to develop in Vive.

    With the oculus it was very easy to show its status, for example, if the hdmi cable of the oculus was disconnected, it deactivated the VR mode and returned to the flat mode and if it reconnected the hdmi cable it returned to VR mode; But with the ViveI notice that it works in a different way, if I disconnect the hdmi cable, the power cable or the Viveba ses go out but it is still in VR mode in unity. I have been reading and I can not find a precise solution because he Vivewith the steamvr and to completely disconnect the Vive I must kill the steamvr service and therefore also kill the process of my game made in unity.

    Recently it occurred to me to use the steamvr information panel where it shows you the HDM status, the controls and the bases so I wonder if I can extract the information from this panel and show it in unity using the open vr api or steamvr?

    This is the information panel I'm talking about:
     
  2. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
  3. NocSchecter

    NocSchecter

    Joined:
    Aug 19, 2015
    Posts:
    33
    Hi Matt_D_work, I'm trying to do something similar to the image below:


    I want to make a connection indicator for an online game for vr; using the oculus I managed to do this functionality and for example, I unplug the hdmi or current cable and the client goes to non-vr mode and the server tells me that the client is connected but the vr mode is disabled. On the other hand with the htc vive at the time of deactivating a cable hdmi or the usb that gives energy, it is still in vr mode (still working) and my server tells me that the client still has vr mode. I already tried to use the XRSettings.is present that gives me unity and even the OpenVR.isHdmPresent () of the steamvr api and I can not do that when disconnecting some cable from the vive it notifies me in my server that it no longer has vr.
     
  4. mikerz1985

    mikerz1985

    Joined:
    Oct 23, 2014
    Posts:
    79
    Hi did you ever figure this one out?
     
  5. eaquino_unity

    eaquino_unity

    Joined:
    Aug 13, 2019
    Posts:
    13
    HI, i did use: OpenVR.System.IsTrackedDeviceConnected() from openvr sdk
     
    gentleman0215 likes this.