mirror of
https://github.com/overte-org/overte.git
synced 2025-07-25 15:48:34 +02:00
check for release of equip in this.nearGrabbing
This commit is contained in:
parent
c3d736dd16
commit
4fcccb5455
1 changed files with 8 additions and 9 deletions
|
@ -1088,15 +1088,7 @@ function MyController(hand) {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.secondaryReleased = function() {
|
this.secondaryReleased = function() {
|
||||||
var released = _this.rawSecondaryValue < BUMPER_ON_VALUE;
|
return _this.rawSecondaryValue < BUMPER_ON_VALUE;
|
||||||
|
|
||||||
if (released) {
|
|
||||||
// if we were holding something, the release of the
|
|
||||||
// secondary trigger releases it
|
|
||||||
_this.release();
|
|
||||||
}
|
|
||||||
|
|
||||||
return released;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// this.triggerOrsecondarySqueezed = function () {
|
// this.triggerOrsecondarySqueezed = function () {
|
||||||
|
@ -2159,6 +2151,13 @@ function MyController(hand) {
|
||||||
|
|
||||||
if (this.state == STATE_HOLD) {
|
if (this.state == STATE_HOLD) {
|
||||||
|
|
||||||
|
if (this.secondaryReleased()) {
|
||||||
|
// we have an equipped object and the secondary trigger was released
|
||||||
|
// short-circuit the other checks and release it
|
||||||
|
this.release()
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var dropDetected = this.dropGestureProcess(deltaTime);
|
var dropDetected = this.dropGestureProcess(deltaTime);
|
||||||
|
|
||||||
if (this.triggerSmoothedReleased()) {
|
if (this.triggerSmoothedReleased()) {
|
||||||
|
|
Loading…
Reference in a new issue