From b487b2582e7c904b19d143b50b974aa7ab872bb6 Mon Sep 17 00:00:00 2001
From: Sara <sara@saragerretsen.nl>
Date: Wed, 25 Oct 2023 11:25:35 +0200
Subject: [PATCH] moved call to apply forces to physics solver

---
 src/physics_entity.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/physics_entity.c b/src/physics_entity.c
index f193456..4fc4924 100644
--- a/src/physics_entity.c
+++ b/src/physics_entity.c
@@ -63,6 +63,7 @@ void physics_entity_apply_collision_forces(PhysicsEntity self, List* contacts) {
 }
 
 void physics_entity_solve_contacts(PhysicsEntity self, List* contacts) {
+    physics_entity_apply_collision_forces(self, contacts);
     RigidBody* body = self.tc->get_rigidbody(self.data);
     const Transform pre_solve = *rigidbody_get_transform(body);
     // attempt to solve constraints
@@ -95,7 +96,6 @@ void physics_entity_update(PhysicsEntity self) {
 
     List* contacts = rigidbody_get_contacts(body);
     if(contacts->len > 0) {
-        physics_entity_apply_collision_forces(self, contacts);
         self.tc->collision_solver(self.data, contacts);
     }