use of com.gemserk.commons.artemis.components.PhysicsComponent in project commons-gdx by gemserk.
the class AntiGravitySystem method process.
@Override
protected void process(Entity e) {
PhysicsComponent physicsComponent = Components.getPhysicsComponent(e);
Body body = physicsComponent.getPhysics().getBody();
Vector2 gravity = body.getWorld().getGravity();
tmp.set(gravity).mul(-body.getMass());
body.applyForceToCenter(tmp);
}
Aggregations