aboutsummaryrefslogtreecommitdiff
path: root/src/test/CollisionTest.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-17 14:50:08 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-17 14:50:08 +0100
commitc3c565f7c8d1e7e9899b8c2fbb1c313a45e4b10b (patch)
tree33b937a5c0cd3413078ac6fd9ccc82ee60763acd /src/test/CollisionTest.cpp
parent4080a2eec207b35b36f7d0ceae7c2afcfcdfd977 (diff)
parent9232a98b72eee7af4f7f2153c1b2ccedbfa4cc65 (diff)
Merge branch 'master' of https://github.com/lonkaars/crepe into wouter/text-component
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 2ad65fa..ff9e7cc 100644
--- a/src/test/CollisionTest.cpp
+++ b/src/test/CollisionTest.cpp
@@ -69,10 +69,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,
@@ -84,7 +84,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());
@@ -100,7 +100,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());