aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/crepe/system/CollisionSystem.cpp4
-rw-r--r--src/example/game.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/crepe/system/CollisionSystem.cpp b/src/crepe/system/CollisionSystem.cpp
index f75d0ad..fe2d669 100644
--- a/src/crepe/system/CollisionSystem.cpp
+++ b/src/crepe/system/CollisionSystem.cpp
@@ -191,7 +191,7 @@ CollisionSystem::collision_handler(CollisionInternal & data1, CollisionInternal
}
Direction resolution_direction = Direction::NONE;
- if (resolution.x != 0 && resolution.y > 0) {
+ if (resolution.x != 0 && resolution.y != 0) {
resolution_direction = Direction::BOTH;
} else if (resolution.x != 0) {
resolution_direction = Direction::X_DIRECTION;
@@ -306,7 +306,7 @@ void CollisionSystem::determine_collision_handler(CollisionInfo & info) {
if (info.this_rigidbody.data.body_type == Rigidbody::BodyType::STATIC) return;
// If second body is static perform the static collision handler in this system
if (info.other_rigidbody.data.body_type == Rigidbody::BodyType::STATIC) {
- static_collision_handler(info);
+ this->static_collision_handler(info);
};
// Call collision event for user
CollisionEvent data(info);
diff --git a/src/example/game.cpp b/src/example/game.cpp
index be756bd..af99097 100644
--- a/src/example/game.cpp
+++ b/src/example/game.cpp
@@ -201,7 +201,7 @@ public:
"Name", "Tag", vec2{screen_size_width / 2, screen_size_height / 2}, 0, 1);
game_object1.add_component<Rigidbody>(Rigidbody::Data{
.mass = 1,
- .gravity_scale = 0,
+ .gravity_scale = 0.05,
.body_type = Rigidbody::BodyType::DYNAMIC,
.linear_velocity = {0, 0},
.constraints = {0, 0, 0},