From 87ea9161e4409d0f3d7aee5c444d4996308ef45b Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Fri, 20 Jan 2017 14:49:49 -0800 Subject: [PATCH] avoid bad interaction between far-grab and equip --- scripts/system/controllers/handControllerGrab.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/system/controllers/handControllerGrab.js b/scripts/system/controllers/handControllerGrab.js index 5faed900a0..2df92d21bb 100644 --- a/scripts/system/controllers/handControllerGrab.js +++ b/scripts/system/controllers/handControllerGrab.js @@ -2040,8 +2040,8 @@ function MyController(hand) { this.ensureDynamic = function() { // if we distance hold something and keep it very still before releasing it, it ends up // non-dynamic in bullet. If it's too still, give it a little bounce so it will fall. - var props = Entities.getEntityProperties(this.grabbedEntity, ["velocity", "dynamic"]); - if (props.dynamic) { + var props = Entities.getEntityProperties(this.grabbedEntity, ["velocity", "dynamic", "parentID"]); + if (props.dynamic && props.parentID == NULL_UUID) { var velocity = props.velocity; if (Vec3.length(velocity) < 0.05) { // see EntityMotionState.cpp DYNAMIC_LINEAR_VELOCITY_THRESHOLD velocity = { x: 0.0, y: 0.2, z:0.0 };