From 5197b3a60882803b3cda2b8ffaceb7e47e706a5c Mon Sep 17 00:00:00 2001 From: Dustin Date: Sat, 31 May 2025 08:41:17 -0700 Subject: [PATCH] It actually kinda works! --- src/classes/velocity_controller.gd | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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