0 votes

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)

Godot version 3.4.rc2
in Engine by (120 points)

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?

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.

1 Answer

+1 vote
Best answer

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.

by (46 points)
selected by

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

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.