diff options
-rw-r--r-- | src/crepe/system/CollisionSystem.cpp | 1 | ||||
-rw-r--r-- | src/example/game.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/crepe/system/CollisionSystem.cpp b/src/crepe/system/CollisionSystem.cpp index 719713c..6ed640a 100644 --- a/src/crepe/system/CollisionSystem.cpp +++ b/src/crepe/system/CollisionSystem.cpp @@ -184,6 +184,7 @@ bool CollisionSystem::detect_collision(CollisionInternal & self,CollisionInterna }; resolution = this->get_box_circle_detection(BOX1, CIRCLE2); if(resolution == vec2{-1,-1}) return false; + resolution = -resolution; break; } case CollisionInternalType::CIRCLE_CIRCLE: { diff --git a/src/example/game.cpp b/src/example/game.cpp index f931878..ce2f351 100644 --- a/src/example/game.cpp +++ b/src/example/game.cpp @@ -224,7 +224,7 @@ public: game_object1.add_component<Rigidbody>(Rigidbody::Data{ .mass = 1, .gravity_scale = 0, - .body_type = Rigidbody::BodyType::DYNAMIC, + .body_type = Rigidbody::BodyType::KINEMATIC, .linear_velocity = {0, 0}, .constraints = {0, 0, 0}, .elastisity_coefficient = 1, |