// Create a new collision controller, and set on the avatar
CollisionController controller = new CollisionController(collisionGraph,
(JMECollisionSystem) collisionSystem);
collisionChangeRequestListener.setCollisionController(controller);
AvatarController ac = (AvatarController)avatar.getContext().getController();
ac.setCollisionController(controller);
if (collisionListener==null) {
collisionListener = new WLCollisionListener();
}
ac.addCollisionListener(collisionListener);
} else {
AvatarController ac = (AvatarController)avatar.getContext().getController();
ac.setCollisionController(null);
ac.removeCollisionListener(collisionListener);
}
}