-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
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 XrJoint
s. A typical scenario is loading a GLB model of a hand and linking XrJoint
s 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
}
}