Merge pull request #5943 from sethalves/no-avatar-collision-with-held

rearrange when grab script changes avatar collisions
This commit is contained in:
Andrew Meadows 2015-09-29 15:56:11 -07:00
commit ddbdf2be86

View file

@ -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) {