mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +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() {
|
||||
var released = _this.rawSecondaryValue < BUMPER_ON_VALUE;
|
||||
|
||||
if (released) {
|
||||
// if we were holding something, the release of the
|
||||
// secondary trigger releases it
|
||||
_this.release();
|
||||
}
|
||||
|
||||
return released;
|
||||
return _this.rawSecondaryValue < BUMPER_ON_VALUE;
|
||||
};
|
||||
|
||||
// this.triggerOrsecondarySqueezed = function () {
|
||||
|
@ -2159,6 +2151,13 @@ function MyController(hand) {
|
|||
|
||||
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);
|
||||
|
||||
if (this.triggerSmoothedReleased()) {
|
||||
|
|
Loading…
Reference in a new issue