Controller joystick gives smaller input than button press

Godot Version

4.2.2

Question

Hey! I'm trying to make a 2D platformer in godot. I'm not that well versed in godot, and I've stumbled upon a slight problem. When i try to controll my player character using a controller joystick, it moves slower than when i use the arrowbuttons on my keyboard. I made the script print out the input the controller gives to godot, and it is much smaller than which input the arrowkeys give (Controller gives Ca. 0.75 and arrows give 1). I've been searching for quite a bit of time now, but i haven't found any similar questions. Does someone know how to fix this? THANKS!!

I'm using a procontroller, which works perfectly fine on the switch, so that shouldnt be the problem. I'm also using Input.get_axis() to get the direction my player should move.

Controller inputs are analog, so the more you move the stick off the center, the more “power” it will give you on the Vector.
If you don’t want that, you can normalize your vector be calling direction.normalized().

2 Likes

I figured it out! According to this reddit thread i just had to recalibrate my device: https://www.reddit.com/r/bindingofisaac/comments/nny3wr/slow_movement_with_analog_stick_using_nintendo/

I’d recommend you follow @wchc. Recalibrating your controller will only partially solve the issue for you, and not at all for your players.

Analog input varies depending on how far you push the joystick. This makes sense for precise movement. If you don’t want that, normalize your inputs, so it will always be 0 or 1.

Also: all analog input has a deadzone to account for possible unwanted input.

2 Likes