From a6040197ebad09cf61b7d243193eb56a8fadeede Mon Sep 17 00:00:00 2001 From: Menithal Date: Thu, 29 Sep 2016 21:55:58 +0300 Subject: [PATCH] Fixed HandcontrollerGrab unequip. Will now use deltaTime and a second instead of instantly disconnecting on if more than 0.1 off. This is to avoid accidental disconnection due to acceleration and latency --- 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 05edcdad03..6eaaf11f8a 100644 --- a/scripts/system/controllers/handControllerGrab.js +++ b/scripts/system/controllers/handControllerGrab.js @@ -2098,7 +2098,7 @@ function MyController(hand) { var TEAR_AWAY_DISTANCE = 0.1; var dist = distanceBetweenPointAndEntityBoundingBox(handPosition, props); if (dist > TEAR_AWAY_DISTANCE) { - this.autoUnequipCounter += 1; + this.autoUnequipCounter += deltaTime; } else { this.autoUnequipCounter = 0; }