Skip to content

Commit bada12c

Browse files
committed
js: Disable controller on start
Disable controller when the input source is hand on the start
1 parent 9e2d23a commit bada12c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

hand-tracking.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,5 +246,11 @@ export class HandTracking extends Component {
246246

247247
setupVREvents(s) {
248248
this.session = s;
249+
for (let i = 0; i < s.inputSources.length; ++i) {
250+
const source = s.inputSources[i];
251+
if (!source.hand || !this.controllerToDeactivate) return;
252+
this.controllerToDeactivate.active = false;
253+
this.setChildrenActive(false, this.controllerToDeactivate);
254+
}
249255
}
250256
}

0 commit comments

Comments
 (0)