mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-30 08:43:44 +02:00
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:
parent
f73cd1d65e
commit
a6040197eb
1 changed files with 1 additions and 1 deletions
|
@ -2098,7 +2098,7 @@ function MyController(hand) {
|
||||||
var TEAR_AWAY_DISTANCE = 0.1;
|
var TEAR_AWAY_DISTANCE = 0.1;
|
||||||
var dist = distanceBetweenPointAndEntityBoundingBox(handPosition, props);
|
var dist = distanceBetweenPointAndEntityBoundingBox(handPosition, props);
|
||||||
if (dist > TEAR_AWAY_DISTANCE) {
|
if (dist > TEAR_AWAY_DISTANCE) {
|
||||||
this.autoUnequipCounter += 1;
|
this.autoUnequipCounter += deltaTime;
|
||||||
} else {
|
} else {
|
||||||
this.autoUnequipCounter = 0;
|
this.autoUnequipCounter = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue