OpenXR detect HMD present

Hi,

I am developing a VR application in Unity on the Oculus Quest…
But when a new user takes on headset, I need to reset the world around him…
And in order to do that, I need to detect if a user has just put on headset…

Any clue on how to detect this ??

I think you have a better chance asking this on a Unity forum, since it seems primarily about how to access the proximity sensor state from Unity.

Since you are asking this in the OpenXR section I’m assuming you are using the OpenXR plugin in Unity and also the (new) Input System to access controller buttons and tracking data: You can bind an action of type “button” to binding path <XRHMD>/userPresence (in the binding path dropdown select: XR HMD, Optional Controls, userPresence).

In general, this (prox aka “user engagement” sensor) gets exposed through the Session Lifecycle. I don’t know how Unity exposes this, or the exact details of how it works on Quest, but it should get you pretty close. https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#session-lifecycle

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.