Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to return to 2D mode on removing headset with VDXR/PimaxXR #15

Closed
sicsix opened this issue Jan 1, 2024 · 8 comments
Closed

Comments

@sicsix
Copy link

sicsix commented Jan 1, 2024

When taking off a Quest 3 headset using OpenXR through Oculus the camera position resets and the spectator view appears as if VR wasn't enabled at all - the world and screen space rendering are synced up correctly (in this case a 3D map with 2D labels), this works great.

However, Quest 3/VDXR doesn't return to 2D rendering when taking off headset, neither does Crystal/PimaxXR. Manually resetting the camera position through the hotkeys doesn't work either, the world and screen space portions remain out of sync when moving around the map.

@sicsix
Copy link
Author

sicsix commented Jan 1, 2024

From what I've been able to figure out, but I could be mistaken, it seems like the Oculus XR runtime itself is sending XR_SESSION_STATE_STOPPING and XR_SESSION_STATE_IDLE when it no longer detects it's being worn, but VDXR sends nothing.

@mbucchia
Copy link
Collaborator

mbucchia commented Jan 1, 2024

There is no proper support for "user presence" sensing in OpenXR 1.0. What the Oculus OpenXR runtime does has been a source of debate for a while, and the behavior they implement is not in the OpenXR spec and not guaranteed across all OpenXR implementations. This behavior implemented by Oculus is also a major source of headaches for users (go ask DCS users and how they all have taped their sensor on the headset to go around game/runtime bugs due to it).

VDXR/PimaxXR do not implement this non-standard behavior.

@praydog
Copy link
Owner

praydog commented Jan 1, 2024

Would a keybind to switch back to desktop mode for these other runtimes be an acceptable workaround?

@sicsix
Copy link
Author

sicsix commented Jan 1, 2024

Understandable, although it is a useful feature in this particular use case.

Is it possible to detect the HMD worn state through the other runtimes through polling? If so maybe a toggle-able option to switch automatically would be a better UX. Although I'm guessing since user presence sensing is non-standard that's likely a no. So a keybind is likely the only option if that's the case.

@mbucchia
Copy link
Collaborator

mbucchia commented Jan 1, 2024

Is it possible to detect the HMD worn state through the other runtimes through polling

It isn't in OpenXR 1.0. There is an extension in the works for this. Right now the session state events are not implemented the same way across vendors, so you can't make assumption on them.

@sicsix
Copy link
Author

sicsix commented Jan 2, 2024

In that case a keybind would great for now, will make it playable for all runtimes.

@praydog praydog closed this as completed in 4f9f362 Jan 2, 2024
@praydog
Copy link
Owner

praydog commented Jan 2, 2024

Added in 4f9f362

@sicsix
Copy link
Author

sicsix commented Jan 2, 2024

Just tested it and works perfectly, thanks for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants