diff --git a/src/collision.c b/src/collision.c index 15bd2d9..dfe646c 100644 --- a/src/collision.c +++ b/src/collision.c @@ -86,8 +86,7 @@ int _internal_collision_get_overlap(PhysicsEntity self, PhysicsEntity other, Col RigidBody* rba = self.tc->get_rigidbody(self.data); RigidBody* rbb = other.tc->get_rigidbody(other.data); - Vector velocity = rigidbody_get_velocity(rba); - velocity = vsubf(velocity, rigidbody_get_velocity(rbb)); + Vector velocity = vsubf(rigidbody_get_velocity(rba), rigidbody_get_velocity(rbb)); *out = (Collision) { .other = other,