Skip to content

Commit

Permalink
Only update position and rotation of wristObject3D when joint poses a…
Browse files Browse the repository at this point in the history
…re available
  • Loading branch information
mrxz committed Jan 25, 2024
1 parent 770f95a commit a001bbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/hand-tracking-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ module.exports.Component = registerComponent('hand-tracking-controls', {
var jointPose = new THREE.Matrix4();
return function () {
var wristObject3D = this.wristObject3D;
if (!wristObject3D) { return; }
if (!wristObject3D || !this.hasPoses) { return; }
jointPose.fromArray(this.jointPoses, WRIST_INDEX * 16);
wristObject3D.position.setFromMatrixPosition(jointPose);
wristObject3D.quaternion.setFromRotationMatrix(jointPose);
Expand Down

0 comments on commit a001bbd

Please sign in to comment.