diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-11-11 20:49:55 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-11-11 20:49:55 +0100 |
commit | f2e5b685fd1357b55beeea967b12b353c5d65fb5 (patch) | |
tree | 838aaa7aa89e9360215edaae52dfb76a7740d153 /src/example/collision.cpp | |
parent | 47dd27c42f375b65ee53f8b1e8c1b25327315a92 (diff) |
fixed build issue
Diffstat (limited to 'src/example/collision.cpp')
-rw-r--r-- | src/example/collision.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/example/collision.cpp b/src/example/collision.cpp index 9faac69..dc97c81 100644 --- a/src/example/collision.cpp +++ b/src/example/collision.cpp @@ -13,7 +13,7 @@ using namespace std; int main(int argc, char * argv[]) { - GameObject game_object1(0, "Name", "Tag", Vector2{1, 1}, 90, 1); + GameObject game_object1(0, "Name", "Tag", Vector2{10, 10}, 0, 1); game_object1.add_component<Rigidbody>(Rigidbody::Data{ .mass = 1, .gravity_scale = 1, @@ -21,11 +21,11 @@ int main(int argc, char * argv[]) { .constraints = {0, 0, 0}, .use_gravity = true, .bounce = false, - .offset = {3,3} + .offset = {0,0} }); - game_object1.add_component<BoxCollider>(Vector2{5, 5}, 100, 50); + game_object1.add_component<BoxCollider>(Vector2{5, 5}, 5, 5); - GameObject game_object2(1, "Name", "Tag", Vector2{20, 2}, 90, 1); + GameObject game_object2(1, "Name", "Tag", Vector2{20, 0}, 90, 1); game_object2.add_component<Rigidbody>(Rigidbody::Data{ .mass = 1, .gravity_scale = 1, @@ -33,9 +33,9 @@ int main(int argc, char * argv[]) { .constraints = {0, 0, 0}, .use_gravity = true, .bounce = false, - .offset = {4,4} + .offset = {0,0} }); - game_object2.add_component<BoxCollider>(Vector2{6, 6}, 100, 50); + game_object2.add_component<BoxCollider>(Vector2{5, 5}, 5, 5); CollisionSystem coltest; coltest.update(); return 0; |