diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-11-14 19:07:07 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-11-14 19:07:07 +0100 |
commit | b748691ea7aab8bd12ed76e81f9e9b4539e7d2f7 (patch) | |
tree | add1f69cc517c1a8763171604deeaa48bafe74f6 /src/test/CollisionTest.cpp | |
parent | 15c4cf103c4da7808b7173581ead22ab7190632d (diff) |
fixed bugs in collision system
Diffstat (limited to 'src/test/CollisionTest.cpp')
-rw-r--r-- | src/test/CollisionTest.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
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<BoxCollider>(Vector2{0,0},10,10); + game_object2->add_component<CircleCollider>(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(); } |