Skip to content

Commit 6c56285

Browse files
authored
Only update position and rotation of wristObject3D when joint poses are available (#5438)
Co-authored-by: Noeri Huisman <[email protected]>
1 parent 770f95a commit 6c56285

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/hand-tracking-controls.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ module.exports.Component = registerComponent('hand-tracking-controls', {
194194
var jointPose = new THREE.Matrix4();
195195
return function () {
196196
var wristObject3D = this.wristObject3D;
197-
if (!wristObject3D) { return; }
197+
if (!wristObject3D || !this.hasPoses) { return; }
198198
jointPose.fromArray(this.jointPoses, WRIST_INDEX * 16);
199199
wristObject3D.position.setFromMatrixPosition(jointPose);
200200
wristObject3D.quaternion.setFromRotationMatrix(jointPose);

0 commit comments

Comments
 (0)