Godot Version
v4.5.1.stable.mono.official [f62fdbde1]
Question
Hi everyone, this is my first project with Godot and gave development in general and I am writing here because I’ve been struggling with an issue for a few days now. I am using Windows.
My game has many objects in movement on the screen, including one you can control with the keyboard. So far so good, however, I have noticed that serious jitter is introduced on everything that moves as soon as I move the cursor of the mouse over the game screen (nothing happens when it’s out of it). Note that I am not processing the mouse position so far and I have no _Input() method in my code.
I used ChatGPT to optimise what I could optimise, and rule out any possible issue, which I did.
Eventually I stripped my project of every node but one to isolate the culprit, without success.
It soon became clear that my code played no part in the issue and that it was happening on engine level, before I could even do anything about it.
I can see that the profiler displays huge blue spike (process) toward the bottom every time the mouse cursor moves on the screen.
Out of idea, I tried it on my work laptop (that is much more less powerful than my dev PC) and to my surprise no jitter whatsoever happened, not even one.
I tried to use the same mouse I use on my laptop but on my PC, no change.
Then I tried to reduce the poling rate from 1000Hz to 500Hz (mouse is a G502 Hero) and I notice that the issue improved consequently, I changed it to 125Hz and it totally disappeared.
Now the confusing thing is that the mouse polling rate on my laptop is also 1000Hz, this makes me think that it is not the only aspect that is involved.
Laptops often:
-use integrated USB controllers
-batch HID events differently
-coalesce input more aggressivelyDesktop PCs (especially gaming motherboards):
-expose raw HID input more directly
-generate many more per-frame interruptsSame polling rate ≠ same delivery pattern.
Your desktop is probably processing raw mouse input more aggressively, causing micro-stalls.
Then it said that:
Other engines such as Unity, Unreal, SDL, GLFW apps all have reports of this exact behavior, the difference is that they have a mitigation system to counter that phenomenon that Godot doesn’t have.
It’s not a problem for me to reduce the polling rate on my mouse while I am working on the project but it doesn’t seem to be a viable solution to ask potential users of the game to do the same if they encounter this issue.
So, I would like to know if it is this a known issue and if there is something that can be done about it?
Thank you.