From 54b96cd6029544e4201647f49a420602be6c416b Mon Sep 17 00:00:00 2001 From: David Rowe Date: Sat, 9 Jun 2018 11:32:10 +1200 Subject: [PATCH] Fix incomplete transition from far-grabbing entity to grabbing tablet --- .../controllers/controllerModules/farActionGrabEntity.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/system/controllers/controllerModules/farActionGrabEntity.js b/scripts/system/controllers/controllerModules/farActionGrabEntity.js index d79ffeb5ac..e4563fda14 100644 --- a/scripts/system/controllers/controllerModules/farActionGrabEntity.js +++ b/scripts/system/controllers/controllerModules/farActionGrabEntity.js @@ -430,10 +430,11 @@ Script.include("/~/system/libraries/Xform.js"); } if (this.actionID) { - // if we are doing a distance grab and the object gets close enough to the controller, + // if we are doing a distance grab and the object or tablet gets close enough to the controller, // stop the far-grab so the near-grab or equip can take over. for (var k = 0; k < nearGrabReadiness.length; k++) { - if (nearGrabReadiness[k].active && nearGrabReadiness[k].targets[0] === this.grabbedThingID) { + if (nearGrabReadiness[k].active && (nearGrabReadiness[k].targets[0] === this.grabbedThingID + || HMD.tabletID && nearGrabReadiness[k].targets[0] === HMD.tabletID)) { this.endFarGrabAction(); return makeRunningValues(false, [], []); }