mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-11 23:07:23 +02:00
release near and far grab at trigger click detent
This commit is contained in:
parent
f37570dc9a
commit
5167809342
1 changed files with 3 additions and 2 deletions
|
@ -1443,7 +1443,8 @@ function MyController(hand) {
|
|||
};
|
||||
|
||||
this.distanceHolding = function(deltaTime, timestamp) {
|
||||
if (this.triggerSmoothedReleased()) {
|
||||
|
||||
if (!this.triggerClicked) {
|
||||
this.callEntityMethodOnGrabbed("releaseGrab");
|
||||
this.setState(STATE_OFF, "trigger released");
|
||||
return;
|
||||
|
@ -1761,7 +1762,7 @@ function MyController(hand) {
|
|||
|
||||
this.nearGrabbing = function(deltaTime, timestamp) {
|
||||
|
||||
if (this.state == STATE_NEAR_GRABBING && this.triggerSmoothedReleased()) {
|
||||
if (this.state == STATE_NEAR_GRABBING && !this.triggerClicked) {
|
||||
this.callEntityMethodOnGrabbed("releaseGrab");
|
||||
this.setState(STATE_OFF, "trigger released");
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue