toggle controller raycaster only in VR

This commit is contained in:
Kevin Ngo
2018-09-20 18:05:32 -07:00
parent 2804a41bb6
commit 2cc1fac9c9
3 changed files with 11 additions and 3 deletions

View File

@@ -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;