Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
MarkHenryC's avatar
MarkHenryC
Protege
1 year ago

userPresence always reads true when casting on Quest

This looks like a bug (but perhaps it's something that was done for a better streaming experience.) HMDMount/HMDUnmount notifications don't occur when casting. Querying the UnityEngine.XR.InputDevice API behaves as expected for the CommonUsages.userPresence query, but always returns true when casting, even with the headset off for a significant time. Ditto with the OVRPlugin.userPresent property queries.

For some applications, a safety warning notice needs to appear, followed by explicit user agreement,  when it's likely that a user has passed on the headset. However, when casting, this cannot be done.

Is there any other way to get this information - assuming the always-true result is intentional - short of directly querying the Android OS's proximity sensor API via plugin?

Any info greatly appreciated.

1 Reply

Replies have been turned off for this discussion
  • UPDATE: I can confirm the following:

    (1) I see this is probably expected behaviour. In Meta Quest release notes for build 64 the feature "Keep casting when headset taken off" was added.

    (2) I can confirm that there are no APIs available through OVR or Unity XR that can read mount status while casting.

    (3) Also confirming that directly calling Android's Sensor APIs does not help, as they are not mapped to the Quest hardware.

    While the continuous streaming seems to be demand-based, there are situations where it's a necessity to be able to read the actual proximity status.