mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
making PR requests
This commit is contained in:
parent
47eb7a0899
commit
d81420542c
1 changed files with 7 additions and 5 deletions
|
@ -172,8 +172,12 @@ Script.include("/~/system/libraries/cloneEntityUtils.js");
|
|||
if (now - this.lastUnequipCheckTime > MSECS_PER_SEC * TEAR_AWAY_CHECK_TIME) {
|
||||
this.lastUnequipCheckTime = now;
|
||||
if (props.parentID === MyAvatar.SELF_ID) {
|
||||
var sensorScaleFactor = MyAvatar.sensorToWorldScale;
|
||||
if ((props.localPosition > TEAR_AWAY_DISTANCE * sensorScaleFactor)) {
|
||||
var tearAwayDistance = TEAR_AWAY_DISTANCE;
|
||||
var localX = props.localPosition.x;
|
||||
var localZ = props.localPosition.z;
|
||||
var localY = props.localPosition.y;
|
||||
if ((localX > tearAwayDistance) || (localY > tearAwayDistance) ||
|
||||
(localZ > tearAwayDistance)) {
|
||||
this.autoUnequipCounter++;
|
||||
} else {
|
||||
this.autoUnequipCounter = 0;
|
||||
|
@ -237,10 +241,8 @@ Script.include("/~/system/libraries/cloneEntityUtils.js");
|
|||
for (var i = 0; i < nearbyEntityProperties.length; i++) {
|
||||
var props = nearbyEntityProperties[i];
|
||||
var handPosition = controllerData.controllerLocations[this.hand].position;
|
||||
var dist = distanceBetweenPointAndEntityBoundingBox(handPosition, props);
|
||||
var distance = Vec3.distance(handPosition, props.position);
|
||||
if ((dist > TEAR_AWAY_DISTANCE) ||
|
||||
(distance > NEAR_GRAB_RADIUS * sensorScaleFactor)) {
|
||||
if ((distance > NEAR_GRAB_RADIUS * sensorScaleFactor)) {
|
||||
continue;
|
||||
}
|
||||
if (entityIsGrabbable(props) || entityIsCloneable(props)) {
|
||||
|
|
Loading…
Reference in a new issue