Ejemplo n.º 1
0
void RigidBody::addImpulse(Vector2f impulse, Vector2f point) {

	Vector2f dir = (point - position);

	velocity += impulse / mass;
	aVelocity -= dir.crossproduct(impulse) / inertia;
}