mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:29:32 +02:00
Disable picks in controllerDispatcher when not in HMD
This commit is contained in:
parent
d49fabf370
commit
e043d181cd
1 changed files with 15 additions and 0 deletions
|
@ -285,6 +285,21 @@ Script.include("/~/system/libraries/controllerDispatcherUtils.js");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Enable/disable controller raypicking depending on whether we are in HMD
|
||||||
|
if (HMD.active) {
|
||||||
|
Pointers.enablePointer(_this.leftPointer);
|
||||||
|
Pointers.enablePointer(_this.rightPointer);
|
||||||
|
Pointers.enablePointer(_this.leftHudPointer);
|
||||||
|
Pointers.enablePointer(_this.rightHudPointer);
|
||||||
|
Picks.enablePick(_this.mouseRayPick);
|
||||||
|
} else {
|
||||||
|
Pointers.disablePointer(_this.leftPointer);
|
||||||
|
Pointers.disablePointer(_this.rightPointer);
|
||||||
|
Pointers.disablePointer(_this.leftHudPointer);
|
||||||
|
Pointers.disablePointer(_this.rightHudPointer);
|
||||||
|
Picks.disablePick(_this.mouseRayPick);
|
||||||
|
}
|
||||||
|
|
||||||
// raypick for each controller
|
// raypick for each controller
|
||||||
var rayPicks = [
|
var rayPicks = [
|
||||||
Pointers.getPrevPickResult(_this.leftPointer),
|
Pointers.getPrevPickResult(_this.leftPointer),
|
||||||
|
|
Loading…
Reference in a new issue