diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-16 21:26:11 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-16 21:26:11 +0100 |
commit | 6e92c59b3364b00eb15c310120b93acc83ca504e (patch) | |
tree | cf24c206bf444bf8c3e1e51b6ac73be56e69c98c /src/test | |
parent | 5bece30f9ad495a0e82097b2c5668e979856fb69 (diff) | |
parent | 4cddaf8e8b809a69a8e03e79c4f7902920745a9a (diff) |
pulled api change
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/CollisionTest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/CollisionTest.cpp b/src/test/CollisionTest.cpp index 3cb7f33..50e862d 100644 --- a/src/test/CollisionTest.cpp +++ b/src/test/CollisionTest.cpp @@ -68,10 +68,10 @@ public: .body_type = Rigidbody::BodyType::STATIC, }); // 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, @@ -82,7 +82,7 @@ public: .elastisity_coefficient = 1, .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()); @@ -97,7 +97,7 @@ public: .elastisity_coefficient = 1, .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()); |