mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 20:17:01 +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 mouseLookEnabled = false;
|
||||||
|
|
||||||
var oldMode;
|
|
||||||
|
|
||||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||||
|
|
||||||
var tabletUp;
|
var tabletUp;
|
||||||
|
|
||||||
var tempOff = false;
|
var tempOff = false;
|
||||||
|
|
||||||
hmd = AvatarInputs.isHMD;
|
hmd = AvatarInputs.isHMD;
|
||||||
|
|
||||||
if (!hmd){
|
if (!hmd){
|
||||||
|
@ -139,20 +137,11 @@ by rampa3 (https://github.com/rampa3) and vegaslon (https://github.com/vegaslon)
|
||||||
}
|
}
|
||||||
|
|
||||||
function mouseLookOn() {
|
function mouseLookOn() {
|
||||||
oldMode = Camera.mode;
|
|
||||||
Camera.mode = "first person";
|
|
||||||
Camera.captureMouse = true;
|
Camera.captureMouse = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function mouseLookOff() {
|
function mouseLookOff() {
|
||||||
Camera.captureMouse = false;
|
Camera.captureMouse = false;
|
||||||
Camera.mode = oldMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
function onCameraModeUpdated(newMode) {
|
|
||||||
if (Camera.getCaptureMouse()){
|
|
||||||
Camera.captureMouse = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Camera.modeUpdated.connect(onCameraModeUpdated);
|
Camera.modeUpdated.connect(onCameraModeUpdated);
|
||||||
|
|
Loading…
Reference in a new issue