mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 23:02:24 +02:00
Updated the script to enable usage of mouselook with other camera modes.
This commit is contained in:
parent
5d7c9c1cbb
commit
e6f2ba65fd
1 changed files with 1 additions and 12 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue