aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2024-11-14 19:07:07 +0100
committerJAROWMR <jarorutjes07@gmail.com>2024-11-14 19:07:07 +0100
commitb748691ea7aab8bd12ed76e81f9e9b4539e7d2f7 (patch)
treeadd1f69cc517c1a8763171604deeaa48bafe74f6 /src/test
parent15c4cf103c4da7808b7173581ead22ab7190632d (diff)
fixed bugs in collision system
Diffstat (limited to 'src/test')
-rw-r--r--src/test/CollisionTest.cpp14
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();
}