0 votes

Hello, I hope you are all having a nice day.

I'm using the InputMap as the input manager for my game, right now I have left, right, up and down, assigned to both "WASD" and the left joystick of my controller.

I use Input.is_action_pressed("rightAction") to check if the action is pressed.

When I don't have a controller connected, "WASD" works fine, returning true every frame. However, when I connect my controller, using the joystick itself works fine, returning true as well, but trying to use "WASD" while the controller is connected, makes it so Input.is_action_pressed("rightAction") only returns true for the first frame, and then just returns false, making it so I can only move for one frame at a time with "WASD" when having a controller connected.

I tried with the D-pad and it works fine, it's just a problem with InputEventJoypadMotion probably. Maybe it has to do with the deadzone setting on InputMap not working correctly, which I have set up as well in an attempt to fix it. Or I don't know.

Does anyone know if this is a known issue or maybe if I'm missing how to fix it?

Thanks a lot for your time.

Godot version 3.3.4 stable
in Engine by (14 points)

1 Answer

0 votes

Hey Strelly,

thanks. I have a nice day :D. Hope you have 1 2.

What about using the Input.get_axis method?
It gives you a value between -1 and 1. So if the player just moves the stick a little, you'll get a small value.


by (1,081 points)

Hello, thanks a lot for your answer,

I tried using that method, but the problem persisted, the only thing that changed is that, now, when holding down "WASD" while the controller is connected, it changes between "true" and "false" randomly, I'm guessing it's not randomly, but it's what it feels like.


Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.