From b748691ea7aab8bd12ed76e81f9e9b4539e7d2f7 Mon Sep 17 00:00:00 2001 From: JAROWMR Date: Thu, 14 Nov 2024 19:07:07 +0100 Subject: fixed bugs in collision system --- src/test/CollisionTest.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/test/CollisionTest.cpp') diff --git a/src/test/CollisionTest.cpp b/src/test/CollisionTest.cpp index 1c4c325..3e43479 100644 --- a/src/test/CollisionTest.cpp +++ b/src/test/CollisionTest.cpp @@ -52,7 +52,7 @@ protected: .use_gravity = false, .bounce = false, }); - game_object2->add_component(Vector2{0,0},10,10); + game_object2->add_component(Vector2{0,0},5); } }; @@ -67,11 +67,17 @@ TEST_F(CollisionTest, box_box_collision) { collision_system.update(); transform.position = {40,50}; collision_system.update(); - transform.position = {41,50}; + transform.position = {50,39}; collision_system.update(); - transform.position = {44,50}; + transform.position = {50,40}; collision_system.update(); - transform.position = {50,50}; + transform.position = {50,60}; + collision_system.update(); + transform.position = {50,61}; + collision_system.update(); + transform.position = {60,50}; + collision_system.update(); + transform.position = {61,50}; collision_system.update(); } -- cgit v1.2.3