mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 14:02:57 +02:00
always unequip on secondary release
This commit is contained in:
parent
0a024616cc
commit
8cd13eaedf
1 changed files with 3 additions and 17 deletions
|
@ -1062,17 +1062,6 @@ function MyController(hand) {
|
||||||
|
|
||||||
this.secondaryPress = function(value) {
|
this.secondaryPress = function(value) {
|
||||||
_this.rawSecondaryValue = value;
|
_this.rawSecondaryValue = value;
|
||||||
|
|
||||||
if (_this.state == STATE_HOLD && !this.secondaryHeldEquip) {
|
|
||||||
// when using the index trigger click equip
|
|
||||||
// any click on the middle finger trigger should release
|
|
||||||
// check if the middle finger trigger is pressed past the threshold
|
|
||||||
var allowReleaseValue = 0.1;
|
|
||||||
if (value > allowReleaseValue) {
|
|
||||||
_this.release();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.updateSmoothedTrigger = function() {
|
this.updateSmoothedTrigger = function() {
|
||||||
|
@ -1101,9 +1090,9 @@ function MyController(hand) {
|
||||||
this.secondaryReleased = function() {
|
this.secondaryReleased = function() {
|
||||||
return _this.rawSecondaryValue < BUMPER_ON_VALUE;
|
return _this.rawSecondaryValue < BUMPER_ON_VALUE;
|
||||||
|
|
||||||
if (_this.state == STATE_HOLD && this.secondaryHeldEquip) {
|
if (_this.state == STATE_HOLD) {
|
||||||
// when using the middle finger hold equip, the equip is
|
// if we were holding something, the release of the
|
||||||
// dropped when the middle finger trigger is released
|
// secondary trigger releases it
|
||||||
_this.release();
|
_this.release();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1514,9 +1503,6 @@ function MyController(hand) {
|
||||||
this.grabbedEntity = potentialEquipHotspot.entityID;
|
this.grabbedEntity = potentialEquipHotspot.entityID;
|
||||||
this.setState(STATE_HOLD, "equipping '" + entityPropertiesCache.getProps(this.grabbedEntity).name + "'");
|
this.setState(STATE_HOLD, "equipping '" + entityPropertiesCache.getProps(this.grabbedEntity).name + "'");
|
||||||
|
|
||||||
// handle the Oculus Touch equip where the middle finger trigger is held
|
|
||||||
this.secondaryHeldEquip = this.secondarySqueezed && !this.triggerSmoothedGrab;
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue