On Oculus and Vive, XRDevice.userPresence appears to be equal to UserPresenceState.Present even when the HMD is removed from a user.
On Oculus, having no user inside the headset, but keeping the HMD visible of the base stations, results in XRDevice.userPresence remaining equal to Present. On both platforms, removing the HMD from view of their base stations for approximately 10-20 seconds will update the userPresence to NotPresent.
This seems counter to the desired functionality of XRDevice.userPresence. Both Oculus and Vive headsets have a proximity sensor, and it appears that it may be possible to detect user presence through platform specific libraries. However, is it possible to detect a user being inside a HMD using the XR library in unity?
Unity Standalone VR Support doesn’t yet fully utilize the ‘Generic Functionality’ between HMDs (hopefully very soon).
So it currently seems like it’s not possible with unity XR library.
I’m writing a C# wrapper that gets the proximity sensor status directly from the openvr.dll (Native c++), and will release that when it’s done. However, Unity XR proximity works with Oculus for me when using userPresence, only OpenVR requires the 15second wait.