Skip to content

XrJoint does not expose the WebXR joint id #7131

@willeastcott

Description

@willeastcott

It would be useful to be able to query the WebXR spec id of an XrJoint. This is because, when a new hand-based XrInputSource is added, it has an XrHand that in turn, has an array of XrJoints. A typical scenario is loading a GLB model of a hand and linking XrJoints to entities in the instantiated hand model. The names of these entities/nodes stored in the GLB are the WebXR ids. So you want to do something like:

if (inputSource.hand) {
    for (const joint of inputSource.hand.joints) {
        const jointEntity = handRoot.findByName(joint.id); // Need to expose id getter
        // store jointEntity in a map to update every frame from the hands joint
    }
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions