getting weird inputs whenever a controller is connected to my pc

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ababen

when i connect a PS4 controller to my PC and try to move the character in my game using the keyboard, i get some weird movements, like the character suddenly stops sometimes, and i cant go diagonally at all.
I have tried a switch pro controller as well, with that one it’s even worse - its sending tons of random inputs without me pressing anything. so i get the menus in my game constantly opening and closing, stuff like that.
what should i do? to be honest the switch controller always acts weird with pc games but the PS4 controller should be working fine.
I am using windows 10 and godot 3.4.rc2 (though i get the same results on godot 3.3)

Does the weird input show up in Windows game controller settings (the dialog that shows button and axis states) or only in Godot? Have by any change set dead zones for you actions to zero?

fractile | 2021-11-03 14:32

only in godot. and im not talking about controller input. im talking about keyboard input while having a controller connected to my pc, it messes up the movement for some reason. it works if i disconnect the controller.

ababen | 2021-11-03 17:26

:bust_in_silhouette: Reply From: Elatronion

Your issue seems similar to this github issue.

If you are using both keyboard and controller input in a single action, and assuming you are using get_action_strength, it’s possible that you are not given a constant strength, causing weird movements.

The state of the action is based on the last changed event, which isn’t obvious when using analog controls. Though, if no controller is plugged, it would explain why input and therefore movement was returned to normal.

This is a known issue that will be fixed in some future version of Godot.

Try splitting your input into separate analogue and digital actions to see if this fixes your issue in the meantime.

Thank you! I posted this question quite a while ago so I appreciate you for going all the way back here to answer haha

ababen | 2022-08-24 06:35