@Override public void computeEvent(Event evtIn) { synchronized (this) { evt = (AvatarCollisionChangeRequestEvent) evtIn; if (collisionController != null) { collisionController.setCollisionResponseEnabled(evt.isCollisionResponseEnabled()); collisionController.setGravityEnabled(evt.isGravityEnabled()); } } }
public void setCollisionController(CollisionController collisionController) { synchronized (this) { this.collisionController = collisionController; if (collisionController != null) { if (evt != null) { collisionController.setCollisionResponseEnabled(evt.isCollisionResponseEnabled()); collisionController.setGravityEnabled(evt.isGravityEnabled()); } else { collisionController.setCollisionResponseEnabled(true); collisionController.setGravityEnabled(true); } } } }