diff --git a/src/classes/velocity_controller.gd b/src/classes/velocity_controller.gd index 57d4681..6d6ee54 100644 --- a/src/classes/velocity_controller.gd +++ b/src/classes/velocity_controller.gd @@ -169,7 +169,11 @@ func calculate_velocity(_delta :float, _h_impulse_placement_tracking = IMPULSE_PLACEMENT.LEFT_SIDE else: _h_impulse_placement_tracking = IMPULSE_PLACEMENT.RIGHT_SIDE - calc_inertia.x += h_speed.x + if sign(h_speed.x) == sign(h_speed.y): + calc_inertia.x += h_speed.x + else: + ##TODO: Maybe this should be something else + calc_inertia.x = 0 ## F this, didn't work well # if impulse_inertia != calc_inertia.x: ## We have an impulse to apply