From e29bee441d8a62491a7b23f81aaaf56a59397004 Mon Sep 17 00:00:00 2001 From: RandomityGuy <31925790+RandomityGuy@users.noreply.github.com> Date: Mon, 17 Mar 2025 20:07:49 +0530 Subject: [PATCH] alternative fix --- src/Marble.hx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Marble.hx b/src/Marble.hx index af3096b5..30a705a1 100644 --- a/src/Marble.hx +++ b/src/Marble.hx @@ -2151,17 +2151,19 @@ class Marble extends GameObject { move.d.y = -Gamepad.getAxis(Settings.gamepadSettings.moveXAxis); if (@:privateAccess !MarbleGame.instance.world.playGui.isChatFocused()) { if (Key.isDown(Settings.controlsSettings.forward)) { - move.d.x = 1; + move.d.x -= 1; } if (Key.isDown(Settings.controlsSettings.backward)) { - move.d.x = 1; + move.d.x += 1; } if (Key.isDown(Settings.controlsSettings.left)) { - move.d.y = 1; + move.d.y += 1; } if (Key.isDown(Settings.controlsSettings.right)) { - move.d.y = 1; + move.d.y -= 1; } + move.d.x = Util.clamp(move.d.x, -1, 1); + move.d.y = Util.clamp(move.d.y, -1, 1); if (Key.isDown(Settings.controlsSettings.jump) || MarbleGame.instance.touchInput.jumpButton.pressed || Gamepad.isDown(Settings.gamepadSettings.jump)) {