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
This commit is contained in:
Menithal 2016-09-29 21:55:58 +03:00
parent f73cd1d65e
commit a6040197eb

View file

@ -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;
}