mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
Bug fix for dropping near-grabbed entities via thump press.
This commit is contained in:
parent
8792812884
commit
408f65100b
1 changed files with 12 additions and 4 deletions
|
@ -1697,10 +1697,18 @@ function MyController(hand) {
|
|||
return;
|
||||
}
|
||||
|
||||
if ((this.state == STATE_HOLD && dropDetected && this.triggerSmoothedGrab()) || this.thumbPressed()) {
|
||||
this.setState(STATE_OFF, "drop detected");
|
||||
this.callEntityMethodOnGrabbed("releaseEquip");
|
||||
return;
|
||||
if (this.state == STATE_HOLD) {
|
||||
if (dropDetected && this.triggerSmoothedGrab()) {
|
||||
this.setState(STATE_OFF, "drop gesture detected");
|
||||
this.callEntityMethodOnGrabbed("releaseEquip");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.thumbPressed()) {
|
||||
this.setState(STATE_OFF, "drop via thumb press");
|
||||
this.callEntityMethodOnGrabbed("releaseEquip");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.heartBeat(this.grabbedEntity);
|
||||
|
|
Loading…
Reference in a new issue