From 090a0a6e9a7f9fc85184f80bb76410ec80172b51 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Fri, 5 Aug 2016 18:01:48 -0700 Subject: [PATCH] only use hand-sphere vs equipped-item bounding box when deciding to auto-unequip --- scripts/system/controllers/handControllerGrab.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/scripts/system/controllers/handControllerGrab.js b/scripts/system/controllers/handControllerGrab.js index ea95422c7f..f29fdfb00a 100644 --- a/scripts/system/controllers/handControllerGrab.js +++ b/scripts/system/controllers/handControllerGrab.js @@ -223,17 +223,6 @@ CONTROLLER_STATE_MACHINE[STATE_FAR_TRIGGER] = { updateMethod: "farTrigger" }; -function getMaxDimensions(props) { - var maxDimension = props.dimensions.x; - if (props.dimensions.y > maxDimension) { - maxDimension = props.dimensions.y; - } - if (props.dimensions.z > maxDimension) { - maxDimension = props.dimensions.z; - } - return maxDimension; -} - function stateToName(state) { return CONTROLLER_STATE_MACHINE[state] ? CONTROLLER_STATE_MACHINE[state].name : "???"; } @@ -1845,9 +1834,7 @@ function MyController(hand) { if (now - this.lastUnequipCheckTime > MSECS_PER_SEC * CHECK_TOO_FAR_UNEQUIP_TIME) { this.lastUnequipCheckTime = now; - var maxDimension = getMaxDimensions(props); - if (props.parentID == MyAvatar.sessionUUID && - Vec3.length(props.localPosition) > maxDimension * AUTO_UNEQUIP_DISTANCE_FACTOR) { + if (props.parentID == MyAvatar.sessionUUID) { var handPosition = this.getHandPosition(); // the center of the equipped object being far from the hand isn't enough to auto-unequip -- we also // need to fail the findEntities test.