aboutsummaryrefslogtreecommitdiff
path: root/src/test/CollisionTest.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-12-17 14:25:47 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-12-17 14:25:47 +0100
commitbec22107c6754f5f3440d79503ddbc828d7e0cba (patch)
tree074567b1b2071117b369ff9ec208655655e334b4 /src/test/CollisionTest.cpp
parent4d4d791a329c0ca4f0496fd8cb1656a1dab66e47 (diff)
parentc96ef5f62a1369d66e8eba9bf8ed192e3cf8e716 (diff)
merge master
Diffstat (limited to 'src/test/CollisionTest.cpp')
-rw-r--r--src/test/CollisionTest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/CollisionTest.cpp b/src/test/CollisionTest.cpp
index 1ae3058..baa95c1 100644
--- a/src/test/CollisionTest.cpp
+++ b/src/test/CollisionTest.cpp
@@ -70,10 +70,10 @@ public:
.offset = {0, 0},
});
// Create a box with an inner size of 10x10 units
- world.add_component<BoxCollider>(vec2{0, -100}, vec2{100, 100}); // Top
- world.add_component<BoxCollider>(vec2{0, 100}, vec2{100, 100}); // Bottom
- world.add_component<BoxCollider>(vec2{-100, 0}, vec2{100, 100}); // Left
- world.add_component<BoxCollider>(vec2{100, 0}, vec2{100, 100}); // right
+ world.add_component<BoxCollider>(vec2{100, 100}, vec2{0, -100}); // Top
+ world.add_component<BoxCollider>(vec2{100, 100}, vec2{0, 100}); // Bottom
+ world.add_component<BoxCollider>(vec2{100, 100}, vec2{-100, 0}); // Left
+ world.add_component<BoxCollider>(vec2{100, 100}, vec2{100, 0}); // right
game_object1.add_component<Rigidbody>(Rigidbody::Data{
.mass = 1,
@@ -85,7 +85,7 @@ public:
.offset = {0, 0},
.collision_layers = {0},
});
- game_object1.add_component<BoxCollider>(vec2{0, 0}, vec2{10, 10});
+ game_object1.add_component<BoxCollider>(vec2{10, 10}, vec2{0, 0});
BehaviorScript & script_object1
= game_object1.add_component<BehaviorScript>().set_script<CollisionHandler>(1);
script_object1_ref = static_cast<CollisionHandler *>(script_object1.script.get());
@@ -101,7 +101,7 @@ public:
.offset = {0, 0},
.collision_layers = {0},
});
- game_object2.add_component<BoxCollider>(vec2{0, 0}, vec2{10, 10});
+ game_object2.add_component<BoxCollider>(vec2{10, 10}, vec2{0, 0});
BehaviorScript & script_object2
= game_object2.add_component<BehaviorScript>().set_script<CollisionHandler>(2);
script_object2_ref = static_cast<CollisionHandler *>(script_object2.script.get());