From dbdb9dacf2c6b62a1fdbd15e073efaed32cbd145 Mon Sep 17 00:00:00 2001 From: Diego Marcos Segura Date: Fri, 1 Dec 2023 10:24:50 -0800 Subject: [PATCH] Hide hand tracking controls entity when there's no hand tracking available --- src/components/hand-tracking-controls.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/hand-tracking-controls.js b/src/components/hand-tracking-controls.js index 2c14b91a378..a6e8b1b1338 100644 --- a/src/components/hand-tracking-controls.js +++ b/src/components/hand-tracking-controls.js @@ -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) { @@ -335,6 +337,8 @@ module.exports.Component = registerComponent('hand-tracking-controls', { if (data.modelStyle === 'mesh') { this.initMeshHandModel(); } + + this.el.object3D.visible = true; }, initDotsModel: function () {