From f37570dc9ac574db3cb28565abbbc482915e094c Mon Sep 17 00:00:00 2001 From: Eric Levin Date: Thu, 28 Jul 2016 08:23:45 -0700 Subject: [PATCH] only pulse on release when held --- 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 5815e8129f..bd618c5a44 100644 --- a/scripts/system/controllers/handControllerGrab.js +++ b/scripts/system/controllers/handControllerGrab.js @@ -1965,6 +1965,9 @@ function MyController(hand) { var noVelocity = false; if (this.grabbedEntity !== null) { + // Make a small release haptic pulse if we really were holding something + Controller.triggerHapticPulse(HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, this.hand); + // If this looks like the release after adjusting something still held in the other hand, print the position // and rotation of the held thing to help content creators set the userData. var grabData = getEntityCustomData(GRAB_USER_DATA_KEY, this.grabbedEntity, {}); @@ -2002,8 +2005,6 @@ function MyController(hand) { joint: this.hand === RIGHT_HAND ? "RightHand" : "LeftHand" })); - Controller.triggerHapticPulse(HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, this.hand); - this.grabbedEntity = null; this.grabbedHotspot = null;