Add oculus-hand profile to WebXR Input Profile Viewer#278
Open
simonedevit wants to merge 1 commit into
Open
Conversation
deltakosh
pushed a commit
to BabylonJS/Babylon.js
that referenced
this pull request
Oct 9, 2025
This pull request adds the support for hand tracking microgestures, a Meta OpenXR extension - compatible with Quest 2/Pro/3/3S - that adds five boolean inputs per hand (thumb tap + D-pad–like swipes). `WebXROculusHandController` has been created starting from `WebXRGenericHandController` as base and mapping the input profile with the`oculus-hand` profile: https://github.com/immersive-web/webxr-input-profiles/pull/274/files. ___ ### Behaviour As today, all the input controller profiles are retrieved from the WebXR controller [repository](https://immersive-web.github.io/webxr-input-profiles/packages/viewer/dist), unfortunately, the `oculus-hand` controller is missing. I made the PR immersive-web/webxr-input-profiles#278 to add it, but i don't know if/when it will be approved. **As-is** 1. Starting a WebXR session with a compatible Quest device, `xrController.inputSource.profiles` is correctly populated with `oculus-hand` profile: ```ts ['oculus-hand', 'generic-hand', 'generic-hand-select', 'generic-trigger'] ``` 3. All input controller profiles are retrieved from: https://immersive-web.github.io/webxr-input-profiles/packages/viewer/dist/profiles/profilesList.json (but `oclus-hand` is missing). 4. Get `generic-hand` because it is the first available profile: https://immersive-web.github.io/webxr-input-profiles/packages/viewer/dist/profiles/generic-hand/profile.json 5. Map `generic-hand`. **To-be (after pull request is merged)** 1. The user create an XR experience disabling the online controller repository (see "Considerations" below): ```ts scene.createDefaultXRExperienceAsync({ inputOptions: { disableOnlineControllerRepository: true } }) ``` 2. Starting a WebXR session with a compatible Quest device, `xrController.inputSource.profiles` is correctly populated with `oculus-hand` profile: ```ts ['oculus-hand', 'generic-hand', 'generic-hand-select', 'generic-trigger'] ``` 3. The `oculus-hand` profile is retrieved from Babylon.js itself (local). ___ ### Note Forcing the input profile: ```ts scene.createDefaultXRExperienceAsync({ inputOptions: { forceInputProfile: 'oculus-hand' } }) ``` is not a valid option because in any case the `generic-hand` profile will be retrieved. ___ ### Test Tested with Oculus Quest 3. Playground (valid after PR build): https://playground.babylonjs.com/#F41V6N#2275. ___ ### Considerations When the `oculus-hand` profile will be added to online repository, it shouldn't introduce regressions because the `oculus-hand` it will be retrieved and consumed automatically. The `oculus-hand` profile is 1:1 mapping with `generic-hand` profile with the adding of specific swipe components (`menu` - only left hand, `swipe-left`, `swipe-right`, `swipe-forward`, `swipe-backward`, `tap-thumb`). ___ ### Discussion Forum link: https://forum.babylonjs.com/t/hand-tracking-microgestures/60860.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the
oculus-handprofile to the WebXR Input Profile Viewer’s profile selector and makes the profile available at: https://immersive-web.github.io/webxr-input-profiles/packages/viewer/dist/profiles/oculus-hand/profile.json.Assets
left.glbandright.glbwere generated in Blender using thegeneric-handmeshes as a base:swipe-left,swipe-right, etc.) as empty axes objects, following the guidance in the tutorialViewer behavior
As with the
generic-handprofile, the sliders in the Viewer do not affect the model. My assumption is that hands are a special case (unlike typical controllers). If this is not the intended behavior, this PR can serve as a starting point for further adjustments.