Movement keeps triggering

So, I set up the input manager and movement and everything works well.

But when I move left / right, sometimes it keeps triggering the movement, so the player keeps running, without me pressing the arrow-keys. Not quite sure if this is a bug, or a normal behaviour.

I’ve searched on the internet for solutions, but nothing seems to pop up.
Looks like Rick doesn’t have the problem…

Hi Pellens,

First of all, try to figure out if the issue is caused by the user input. If the user input method returns values that are not 0 even though you did not press any key, there might be a hardware issue.

If the values are 0, the issue is very likely somewhere in the code.

Triple checked: the code is absolutely fine, just like Rick’s.

I see a lot of people have the same issue, and there seems to be no fixed atm. So I suppose a hardware problem is not the issue here (never experienced it with any other programming language…)

I played around with the Input Actions’ interactions, created new Actions, … nothing: problem keeps popping up.

Update: I found out it happens when I release 2 keys. So, releasing space en left-arrow, triggers this issue…

So, more info on the topic here:
https://forum.unity.com/threads/bug-with-two-keyboard-keys-pressed-or-released-simultaneously.706955/

Thanks a lot for sharing what you figured out.

Do you use the new or the old Input System? Maybe you could check in your code if the concerning keys were released. If the Input System triggers a “release event” when you release the 2 keys, there could be a workaround for the bug.

Privacy & Terms