Igalia / wolvic

A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
https://wolvic.org
Mozilla Public License 2.0
796 stars 100 forks source link

Controllers disabled when trying to start a webxr session #1329

Closed javifernandez closed 5 months ago

javifernandez commented 6 months ago

Configuration

Wolvic version: 1.7 Wolvic build ID: 308

Hardware: HVR Glasses

Steps to Reproduce

  1. Load a webxr game (eg, XR dinosaurs)
  2. Clink on "View on XR mode" button

Current Behavior

The interstitial screen is shown and there is no way to dismiss it and entering in the WebXR session.

Expected Behavior

After clicking on any controller's button, the webxr session should be presented.

Possible Solution

Context

This is happening only using the Chromium backend.

After some debugging time I came to the conclusion that there is some problem to use the gripSpace to get the aim's pose. We have a comment in the code that Chromium requires the gripSpace when in WebXR sessions, unlike the gecko backend which uses the localSpace as base space.

For some reason the GetPoseSpace call returns a poseLocation with an invalid orientantion bit, so we early return without enabling the controllers.

Under this situation, we can't click on any button while the interstitial widget is being show and in consequence the webxr session is not started.

Error Logs and Stack Traces

``` ```