if (simZyk.getLastTick() % 5500 == 5499) {
Iterator<AbstractAgent3D<?>> iter = env.getAgents().iterator();
while (iter.hasNext()){
AbstractAgent3D agent = iter.next();
agent.getRigidBody().setActivationState(CollisionObject.ACTIVE_TAG);
Vector3f position = agent.getPosition();
Vector3f explosionCenter = new Vector3f(0,-10,0);
explosionCenter.negate();
Vector3f direction = new Vector3f ();
VectorUtil.add(direction, position, explosionCenter);
float distanceFromExplosion = direction.length();
direction.normalize();
direction.scale(1/distanceFromExplosion * 1000f);
agent.getRigidBody().applyCentralImpulse(direction);
}
}
}