From a80e77ff80602161ac937fe8818fcb98a5fd6659 Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Tue, 5 Jan 2016 11:01:00 -0800 Subject: [PATCH] Squeezing bumper while distance grabbing now brings object to your hand --- examples/controllers/handControllerGrab.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/controllers/handControllerGrab.js b/examples/controllers/handControllerGrab.js index bb1dc2d7aa..6a3475f1a3 100644 --- a/examples/controllers/handControllerGrab.js +++ b/examples/controllers/handControllerGrab.js @@ -1119,12 +1119,15 @@ function MyController(hand) { var grabbedProperties = Entities.getEntityProperties(this.grabbedEntity, GRABBABLE_PROPERTIES); var grabbableData = getEntityCustomData(GRABBABLE_DATA_KEY, this.grabbedEntity, DEFAULT_GRABBABLE_DATA); - if (this.state == STATE_CONTINUE_DISTANCE_HOLDING && this.bumperSqueezed() && - typeof grabbableData.spatialKey !== 'undefined') { + if (this.state == STATE_CONTINUE_DISTANCE_HOLDING && this.bumperSqueezed()) { var saveGrabbedID = this.grabbedEntity; this.release(); this.setState(STATE_EQUIP); this.grabbedEntity = saveGrabbedID; + + if (typeof grabbableData.spatialKey === 'undefined') { + Entities.editEntity(this.grabbedEntity, {position: handPosition}); + } return; }