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

Controller's 3D models might not be loaded with multiple interaction profiles #1445

Closed svillar closed 3 months ago

svillar commented 3 months ago

The current code assumes that there is a perfect 1-to-1 match between interaction profiles (or mappings as in the code) and devices. That was true by the FxR time. However that assumption is no longer true since we added support for cross device interaction profiles like hand interaction.

The OpenXR backend code triggers the 3D model loading after verifying that there is an active mapping. That works for most of the cases. However it does break in the following scenario:

  1. A device supports more than 1 profile, for example a specific profile for the device + hand interaction
  2. Wolvic is started without controllers, meaning that hand interaction profile is used. The hand interaction profile does not specify any 3D model so nothing happens.
  3. User picks up the controllers. The controllers ready callback is not called because it was deleted in the previous call to MaybeNotifyControllersReady() so no 3D model for the controllers would be loaded