Skip to content

Commit

Permalink
Hide hand tracking controls entity when there's no hand tracking avai…
Browse files Browse the repository at this point in the history
…lable
  • Loading branch information
dmarcos committed Dec 1, 2023
1 parent 9a9c39e commit dbdb9da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/hand-tracking-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ module.exports.Component = registerComponent('hand-tracking-controls', {
this.el.sceneEl.addEventListener('enter-vr', this.updateReferenceSpace);
this.el.sceneEl.addEventListener('exit-vr', this.updateReferenceSpace);
this.el.addEventListener('child-attached', this.onChildAttached);

this.el.object3D.visible = false;
},

onChildAttached: function (evt) {
Expand Down Expand Up @@ -335,6 +337,8 @@ module.exports.Component = registerComponent('hand-tracking-controls', {
if (data.modelStyle === 'mesh') {
this.initMeshHandModel();
}

this.el.object3D.visible = true;
},

initDotsModel: function () {
Expand Down

0 comments on commit dbdb9da

Please sign in to comment.