ValveSoftware / openvr

OpenVR SDK
http://steamvr.com
BSD 3-Clause "New" or "Revised" License
6.02k stars 1.27k forks source link

OpenVR always returns false when I check the Oculus Rift's head sensor #797

Open tkeene opened 6 years ago

tkeene commented 6 years ago

I'm having trouble getting SteamVR/OpenVR to detect the Oculus Rift's proximity sensor. Any help detecting when the user puts the headset on? I need to know this so I can reset the user's viewpoint for a non-roomscale app (because resetting it manually would be bad UX).

I'm using the SteamVR plugin for Unity v1.2.3 on Unity 2017.3.0f3. Presence detection works just fine when I query the Oculus Rift hardware using the Unity OVR plugin's HMDMounted event, and when I use SteamVR on HMD Odyssey and HTC Vive hardware to query the EVRButtonId.k_EButton_ProximitySensor button I get correct results when I put my thumb in front of those headset sensors. It's just when I use an Oculus Rift with SteamVR the EVRButtonId.k_EButton_ProximitySensor button always returns false, even if I put my thumb on it and the light changes.

I can't use GetTrackedDeviceActivityLevel because its delay is way too huge for quickly setting or resetting things when the user takes the headset off or puts it back on.

I had something similar happen with the HMD Odyssey and the Windows Mixed Reality For SteamVR plugin, but that was patched last month.

Here's a thread on the Steam Discussion forums discussing this issue from several users. It appears inconsistent: https://steamcommunity.com/app/358720/discussions/0/405691491125141530/?ctp=2

pkirsten commented 6 years ago

Same issue here. Any news on this?

hybridherbst commented 5 years ago

I would also like to know this. This bug basically breaks cross-platform compatibly for anything that relies on user presence for game functionality...

Mahallon commented 5 years ago

Upgrading to SteamVR Plugin 2.0 and using the default action HeadsetOnHead worked for me

muchcharles commented 4 years ago

The activity level api has been fixed to better incorporate the proximity sensor now. I'd recommend it over the action, because if an overlay is up, the proximity sensor action won't trigger but activity level will.

Mahallon commented 4 years ago

Just to clarify, the activity level no longer takes a full minute to respond to inactivity, because it incorporates the proximity sensor? And it also triggers on changing app focus from our app to the steam dashboard?