diff --git a/src/components/debug-controller.js b/src/components/debug-controller.js index 414621f..09d908e 100644 --- a/src/components/debug-controller.js +++ b/src/components/debug-controller.js @@ -30,6 +30,9 @@ AFRAME.registerComponent('debug-controller', { secondaryHand.setAttribute('controller', 'controllerType', 'vive-controls'); } + // Enable raycaster. + this.el.emit('enter-vr', null, false); + document.addEventListener('keydown', evt => { var primaryPosition; var primaryRotation; diff --git a/src/index.html b/src/index.html index e73f154..646e576 100644 --- a/src/index.html +++ b/src/index.html @@ -63,9 +63,9 @@ {% macro saber (hand, otherHand, color) %} { } + computeState: (state) => { + state.leftRaycasterActive = state.menu.active && state.activeHand === 'left' && + state.inVR; + state.rightRaycasterActive = state.menu.active && state.activeHand === 'right' && + state.inVR; + } }); function computeSearchPagination (state) {