From 18a7cac06806a81bcd56776a41745d12afc82a0e Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Wed, 27 Jul 2022 00:03:59 -0400 Subject: [PATCH] change dot vector check to be greater than 0 --- src/player/Player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/player/Player.cpp b/src/player/Player.cpp index 02467d6..11aa417 100644 --- a/src/player/Player.cpp +++ b/src/player/Player.cpp @@ -142,7 +142,7 @@ void Player::_physics_process(float delta) }*/ velocity.y = -get_bounce_force(); } - else if (collider->is_in_group("enemy") && (collider->is_in_group("rideable") && Vector2::DOWN.dot(collision->get_normal()) > 0.1)) + else if (collider->is_in_group("enemy") && (collider->is_in_group("rideable") && Vector2::DOWN.dot(collision->get_normal()) > 0)) { _on_player_touched(); }