From e6f2ba65fd94545df6b18c821cb8558256fb47af Mon Sep 17 00:00:00 2001 From: rampa3 <68955305+rampa3@users.noreply.github.com> Date: Mon, 12 Jun 2023 21:18:36 +0200 Subject: [PATCH] Updated the script to enable usage of mouselook with other camera modes. --- scripts/system/controllers/mouseLook.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/scripts/system/controllers/mouseLook.js b/scripts/system/controllers/mouseLook.js index c4790dd87c..49af1fb20f 100644 --- a/scripts/system/controllers/mouseLook.js +++ b/scripts/system/controllers/mouseLook.js @@ -10,14 +10,12 @@ by rampa3 (https://github.com/rampa3) and vegaslon (https://github.com/vegaslon) var mouseLookEnabled = false; - var oldMode; - var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); var tabletUp; var tempOff = false; - + hmd = AvatarInputs.isHMD; if (!hmd){ @@ -139,20 +137,11 @@ by rampa3 (https://github.com/rampa3) and vegaslon (https://github.com/vegaslon) } function mouseLookOn() { - oldMode = Camera.mode; - Camera.mode = "first person"; Camera.captureMouse = true; } function mouseLookOff() { Camera.captureMouse = false; - Camera.mode = oldMode; - } - - function onCameraModeUpdated(newMode) { - if (Camera.getCaptureMouse()){ - Camera.captureMouse = false; - } } Camera.modeUpdated.connect(onCameraModeUpdated);