From 472ff89f48ce9ba69cabd630011295b984ba2012 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Tue, 29 Sep 2015 15:52:38 -0700 Subject: [PATCH] rearrange when avatar collisions are adjusted --- examples/controllers/handControllerGrab.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/controllers/handControllerGrab.js b/examples/controllers/handControllerGrab.js index 0b9238e7c9..388c042285 100644 --- a/examples/controllers/handControllerGrab.js +++ b/examples/controllers/handControllerGrab.js @@ -348,6 +348,9 @@ function MyController(hand, triggerAction) { this.continueDistanceHolding = function() { if (this.triggerSmoothedReleased()) { + // HACK -- until we have collision groups, don't allow held object to collide with avatar + this.revertAvatarCollisions(); + this.state = STATE_RELEASE; return; } @@ -431,6 +434,9 @@ function MyController(hand, triggerAction) { this.disableAvatarCollisions(); if (this.triggerSmoothedReleased()) { + // HACK -- until we have collision groups, don't allow held object to collide with avatar + this.revertAvatarCollisions(); + this.state = STATE_RELEASE; return; } @@ -477,6 +483,9 @@ function MyController(hand, triggerAction) { this.continueNearGrabbing = function() { if (this.triggerSmoothedReleased()) { + // HACK -- until we have collision groups, don't allow held object to collide with avatar + this.revertAvatarCollisions(); + this.state = STATE_RELEASE; return; } @@ -608,9 +617,6 @@ function MyController(hand, triggerAction) { this.release = function() { - // HACK -- until we have collision groups, don't allow held object to collide with avatar - this.revertAvatarCollisions(); - this.lineOff(); if (this.grabbedEntity !== null) {