mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 16:41:57 +02:00
Make mini tablet disappear when using grip the same as the trigger
This commit is contained in:
parent
eac1666e01
commit
9426f72652
1 changed files with 7 additions and 5 deletions
|
@ -617,11 +617,12 @@
|
||||||
pose = Controller.getPoseValue(hand === LEFT_HAND ? Controller.Standard.LeftHand : Controller.Standard.RightHand);
|
pose = Controller.getPoseValue(hand === LEFT_HAND ? Controller.Standard.LeftHand : Controller.Standard.RightHand);
|
||||||
show = pose.valid;
|
show = pose.valid;
|
||||||
|
|
||||||
// Shouldn't show mini tablet on hand if that hand's trigger is pressed (i.e., laser is searching or grabbing
|
// Shouldn't show mini tablet on hand if that hand's trigger or grip are pressed (i.e., laser is searching or hand
|
||||||
// something) or the other hand's trigger is pressed unless it is pointing at the mini tablet. Allow the triggers
|
// is grabbing something) or the other hand's trigger is pressed unless it is pointing at the mini tablet. Allow
|
||||||
// to be pressed briefly to allow for the grabbing process.
|
// the triggers to be pressed briefly to allow for the grabbing process.
|
||||||
if (show) {
|
if (show) {
|
||||||
isLeftTriggerOff = Controller.getValue(Controller.Standard.LT) < TRIGGER_OFF_VALUE;
|
isLeftTriggerOff = Controller.getValue(Controller.Standard.LT) < TRIGGER_OFF_VALUE
|
||||||
|
&& Controller.getValue(Controller.Standard.LeftGrip) < TRIGGER_OFF_VALUE;
|
||||||
if (!isLeftTriggerOff) {
|
if (!isLeftTriggerOff) {
|
||||||
if (leftTriggerOn === 0) {
|
if (leftTriggerOn === 0) {
|
||||||
leftTriggerOn = Date.now();
|
leftTriggerOn = Date.now();
|
||||||
|
@ -631,7 +632,8 @@
|
||||||
} else {
|
} else {
|
||||||
leftTriggerOn = 0;
|
leftTriggerOn = 0;
|
||||||
}
|
}
|
||||||
isRightTriggerOff = Controller.getValue(Controller.Standard.RT) < TRIGGER_OFF_VALUE;
|
isRightTriggerOff = Controller.getValue(Controller.Standard.RT) < TRIGGER_OFF_VALUE
|
||||||
|
&& Controller.getValue(Controller.Standard.RightGrip) < TRIGGER_OFF_VALUE;
|
||||||
if (!isRightTriggerOff) {
|
if (!isRightTriggerOff) {
|
||||||
if (rightTriggerOn === 0) {
|
if (rightTriggerOn === 0) {
|
||||||
rightTriggerOn = Date.now();
|
rightTriggerOn = Date.now();
|
||||||
|
|
Loading…
Reference in a new issue