From dc7bb5b0834764029e9856d0af05a5724773f294 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Thu, 1 Dec 2016 00:17:03 +0000 Subject: [PATCH 1/4] grip button fix --- scripts/system/controllers/handControllerGrab.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/system/controllers/handControllerGrab.js b/scripts/system/controllers/handControllerGrab.js index 341d8aec18..892dbda9c9 100644 --- a/scripts/system/controllers/handControllerGrab.js +++ b/scripts/system/controllers/handControllerGrab.js @@ -2346,6 +2346,7 @@ function MyController(hand) { this.callEntityMethodOnGrabbed("releaseEquip"); } + // Make a small release haptic pulse if we really were holding something Controller.triggerHapticPulse(HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, this.hand); From 1b24d373d291045c0d79e84b043c0cea840f4207 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Thu, 1 Dec 2016 18:02:07 +0000 Subject: [PATCH 2/4] fixed near grab issue --- scripts/system/controllers/handControllerGrab.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/system/controllers/handControllerGrab.js b/scripts/system/controllers/handControllerGrab.js index 892dbda9c9..b8ac27a80c 100644 --- a/scripts/system/controllers/handControllerGrab.js +++ b/scripts/system/controllers/handControllerGrab.js @@ -1009,7 +1009,10 @@ function MyController(hand) { this.secondaryPress = function(value) { _this.rawSecondaryValue = value; - if (value > 0) { + + // The value to check if we will allow the release function to be called + var allowReleaseValue = 0.1; + if (value > 0 && _this.rawTriggerValue <= allowReleaseValue) { _this.release(); } }; From 09d5dc382f7a228238b55c17d23c84899eca2d55 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Mon, 5 Dec 2016 18:08:36 +0000 Subject: [PATCH 3/4] better solution --- scripts/system/controllers/handControllerGrab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/system/controllers/handControllerGrab.js b/scripts/system/controllers/handControllerGrab.js index b8ac27a80c..b9a735cf59 100644 --- a/scripts/system/controllers/handControllerGrab.js +++ b/scripts/system/controllers/handControllerGrab.js @@ -1012,7 +1012,7 @@ function MyController(hand) { // The value to check if we will allow the release function to be called var allowReleaseValue = 0.1; - if (value > 0 && _this.rawTriggerValue <= allowReleaseValue) { + if (value > 0 && _this.state == STATE_HOLD) { _this.release(); } }; From 08301d488d3b41fff52001e50d48c7baec8855d3 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Mon, 5 Dec 2016 18:10:54 +0000 Subject: [PATCH 4/4] clean up --- scripts/system/controllers/handControllerGrab.js | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/system/controllers/handControllerGrab.js b/scripts/system/controllers/handControllerGrab.js index b9a735cf59..ff1407cbf0 100644 --- a/scripts/system/controllers/handControllerGrab.js +++ b/scripts/system/controllers/handControllerGrab.js @@ -2349,7 +2349,6 @@ function MyController(hand) { this.callEntityMethodOnGrabbed("releaseEquip"); } - // Make a small release haptic pulse if we really were holding something Controller.triggerHapticPulse(HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, this.hand);