-
-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Load controller 3D models even with multiple interaction profiles
Now that hand interaction profile is available for some devices it might happen that the user uses it at start time. That profile, as it's meant to be used for hand tracking, does not require any 3D model (the hand 3D model uses hand tracking joints that are not related to the hand interaction profile). This means that the callback of OnControllersReady() in BrowserWorld will not load any 3D model, and then DeviceDelegateOpenXR will uninstall the callback. Then if the user ever grabs a physical controller, the interaction profile will be updated (as we get notified by the runtime), but no 3D models would be ever loaded for those controllers as the callback is now null. In order to fix that, the callback for OnControllersReady now returns a boolean representing whether or not the 3D models where loaded. If it's true then we can uninstall the callback after completion. If it's false then we leave the callback ready for eventual interaction profile changes. Note that this do not support having multiple physical controllers for a single device, but that scenario is unlikely to happen. We have also moved the callback signature to a typedef, that is not really required but it's better for robustness and maintenance as it allows us to modify it in a single place. Fixes #1445
- Loading branch information
Showing
4 changed files
with
14 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters