PhysicsEntity::on_collision will now be called for contacts
This commit is contained in:
parent
979b7cd83b
commit
23454d3065
|
@ -97,6 +97,8 @@ void physics_entity_update(PhysicsEntity self) {
|
|||
List* contacts = rigidbody_get_contacts(body);
|
||||
if(contacts->len > 0) {
|
||||
self.tc->collision_solver(self.data, contacts);
|
||||
list_foreach(Contact, contact, contacts)
|
||||
self.tc->on_collision(self.data, contact->hit);
|
||||
}
|
||||
|
||||
ASSERT_RETURN(!visnanf(rigidbody_get_velocity(body)),, "Velocity is NaN (1)");
|
||||
|
|
Loading…
Reference in a new issue