From 516780934230e1d9ec4914b1e4ad2f607873cf15 Mon Sep 17 00:00:00 2001 From: Eric Levin Date: Thu, 28 Jul 2016 08:51:11 -0700 Subject: [PATCH] release near and far grab at trigger click detent --- scripts/system/controllers/handControllerGrab.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/system/controllers/handControllerGrab.js b/scripts/system/controllers/handControllerGrab.js index bd618c5a44..c023278a3b 100644 --- a/scripts/system/controllers/handControllerGrab.js +++ b/scripts/system/controllers/handControllerGrab.js @@ -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;