Controls non-responsive on certain machines for no discernable reason

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

Last night, I was working on a project just trying to get some basic stuff going like projectiles and enemies and when I ran the scene to test, I noticed that suddenly and unexpectedly, the movement for my character had become choppy and oddly unresponsive. Pressing a direction results in a hitch and then a sudden movement followed by sort of consistent movement until it suddenly stops again. Jumping totally stops movement.

I am using a lightly modified version of the default characterbody3d script and it had been working fine before last night and even moments before. I stripped everything down in the scene, undid all my recent changes with no discernable improvement. I used an old character controller that had been working before I stopped using it with the same result. Then I made a new character controller with the default script, same result. Then I made a new scene with the new controller. Same result.

I thought maybe it was my keyboard, tried a different keyboard, same result. Then finally, tried the same project on a different laptop, and oddly, it worked fine. Tried it again on my main PC, same problem. Even weirder, if I make a fresh project on the PC experiencing the issue, movement works fine. So I am going to migrate my project to a new project to continue work. HOWEVER, I would love to understand why this is happening mainly because if this were to happen to a large project, I would be pretty livid.

Please note that the project is identical on both devices and the project was working fine most of the evening until that fateful moment, the issue also persists after multiple reboots.

GIFs:

Bad movement that sticks and jerks on main PC
Bad Movement on my main PC

Normal movement on laptop
Good movement on my laptop

I would check the frame rate. If the frame rate is dropping, then you probably have an optimization issue where some of your logic isn’t robust (you could then check the resources and what note using the resource monitor to see what part of your project is lagging the game).

godot_dev_ | 2023-05-31 16:31

First of all, thank you very much for you quick and thoughtful response. I tried your suggestions, and learned a thing or two in the process, and was in the process of capturing GIFs demonstrating that the issue does not appear to be related to performance when the root-cause occurred to me, and I am reticent to say that the cause of this issue is far dumber than I could have imagined.

One thing I did do last night was plug in a gamepad to play a game. This project was set up with gamepad controls in addition to M+Kb controls. So the difference between my laptop and my main PC was the presence of a controller and the difference between a fresh project and this one was gamepad support. It would seem that the controller is malfunctioning in some way and providing inputs randomly while sitting on my desk unbothered and that input was interfering with the mouse and keyboard input. Problem solved, understanding achieved, albeit at the cost of my pride.

r00sty | 2023-05-31 21:21

:bust_in_silhouette: Reply From: r00sty

The root cause of the issue was that I had a gamepad plugged in to my main computer and it was providing intermittent input that was interfering with my mouse and keyboard input giving the appearance of poor code or performance issues.