Skip to content

Oculus Quest 2 animations on trigger / grip / button press don't work #5067

@diarmidmackenzie

Description

@diarmidmackenzie

Description:

When I press the trigger or grip, the trigger & grip on the controller models as viewed in VR. Similarly, changes to button colors (as configured via buttonColor, buttonHighlightColor, buttonTouchColor) are not applied.

I hadn't realized this was expected function, but looking at the code in oculus-touch-controls there is code to animate the trigger & grip & change colors of buttons. It looks like it would work for the Oculus Quest 1, but hasn't been updated to work for Oculus Quest 2.

The key bit of code is here, which uses getObjectByName to access the relevant sub-components of the controller 3D model.

I've been looking at the controller models in a GLTF viewer.

the "gen2" model (used for Quest 1) has subcomponents with names that match the code.
image

the "v3" model (used for Quest 2) has a different set of names for the subcomponents (as well as a much more complicated hierarchy).
image

Because the names don't match, the calls to getObjectByName all fail, and the component has no references in buttonMeshes, for example here and here

I haven't looked into what's involved in fixing yet. It might be a matter of just using the alternate names on the calls to getObjectByName. Or it's possible that the details of exactly what rotations & position offsets need to be applied also need to be adjusted to reflect the different controller model.

I'd be happy to look at doing a PR to fix this. I have Quest 2, so I can test that. I don't have a Quest 1, so I won't be able to regression test live, but should be able to cover with Unit Tests. Just wanted to check first that you'd be happy to receive such a PR. And also that the fix should be in the oculus-touch-controls component (rather than e.g. fixing up the v3 model to match the gen2 naming conventions).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions