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

@@ -164,7 +164,12 @@ AFRAME.registerState({
/**
* Post-process the state after each action.
*/
// computeState: (state) => { }
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) {