From b89b6be210011acbdecf7329c7e0eaf7a31784cc Mon Sep 17 00:00:00 2001 From: PhilipRosedale Date: Mon, 29 Feb 2016 16:45:00 -0800 Subject: [PATCH] look for hydra first --- examples/controllers/handControllerMouse.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/controllers/handControllerMouse.js b/examples/controllers/handControllerMouse.js index f42d95e819..d353afab5e 100644 --- a/examples/controllers/handControllerMouse.js +++ b/examples/controllers/handControllerMouse.js @@ -35,12 +35,13 @@ function moveReticleAbsolute(x, y) { var MAPPING_NAME = "com.highfidelity.testing.reticleWithHandRotation"; var mapping = Controller.newMapping(MAPPING_NAME); -mapping.from(Controller.Hardware.Hydra.L3).peek().to(Controller.Actions.ReticleClick); -mapping.from(Controller.Hardware.Hydra.R4).peek().to(Controller.Actions.ReticleClick); +if (Controller.Hardware.hydra !== undefined) { + mapping.from(Controller.Hardware.Hydra.L3).peek().to(Controller.Actions.ReticleClick); + mapping.from(Controller.Hardware.Hydra.R4).peek().to(Controller.Actions.ReticleClick); +} + mapping.enable(); - - function debugPrint(message) { if (DEBUGGING) { print(message);