Skip to content

Conversation

simonedevit
Copy link

This PR adds the oculus-hand profile 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.glb and right.glb were generated in Blender using the generic-hand meshes as a base:

Viewer behavior

As with the generic-hand profile, 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.

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.
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

Successfully merging this pull request may close these issues.

1 participant