From 9d051b71bb59ef79a654bef67baef276462333f7 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Sat, 15 Sep 2018 10:14:22 +1200 Subject: [PATCH] Fix mini tablet sometimes flipping when grabbed by other hand --- scripts/system/miniTablet.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/system/miniTablet.js b/scripts/system/miniTablet.js index 6a12edefaf..bda5909491 100644 --- a/scripts/system/miniTablet.js +++ b/scripts/system/miniTablet.js @@ -397,6 +397,11 @@ deltaRotation, localRotation; + if (Overlays.getProperty(miniOverlay, "parentJointIndex") !== handJointIndex(uiHand)) { + // Overlay has been grabbed by other hand but this script hasn't received notification yet. + return; + } + defaultLocalRotation = MINI_ROTATIONS[uiHand]; handOrientation = Quat.multiply(MyAvatar.orientation, MyAvatar.getAbsoluteJointRotationInObjectFrame(handJointIndex(uiHand)));