Don't send CharacterMoveInputEvent if I don't input anything
See original GitHub issueMotivation
During a debugging session I noticed, that the LocalPlayerSystem
sends a CharacterMoveInputEvent
every tick, even if I’m not pressing any key and not moving the mouse at all.
This does IMO not only create a lot of unnecessary events that might negatively impact, but it also creates a lot of “noise” and makes it harder to debug.
Proposal
Exit early from LocalPlayerSystem#processInput
if there is no input, e.g. no keyboard input creating movement and no mouse or VR input creating view rotation.
My hope would be that this improves performance and reduces unnecessary noise.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Computer not taking input from Keyboard / Mouse
In Safe Mode enter Device Manager reached by right clicking the Start button, choose the Mouse and Keyboard devices, then from Driver tab...
Read more >c# - What would cause SendInput to stop working after each ...
However, when attempting to send this input to a certain application, SendInput only works for the first instance of a certain key.
Read more >How To Fix Keyboard Not Working During Login On Windows 10
If your keyboard is not working/being detected while booting up your Windows 10 computer, this tutorial is for you. Occasionally, when you ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A wild guess on this: gravity on characters seems to come from apply downwards pull on every (affected) movement event. Therefore, might it be necessary to send “dummy no-change events” just to have the gravity be applied to characters each tick?
And since we only do this repeatedly for the player characters, NPCs are affected by gravitiy as soon as they move (e.g., walk or jump), but are not affected by gravity if just standing around… 🤔
That actually makes sense 🙈 I would argue that this should ideally be done separate from actual movements, but guess it’s quite entangled at the moment and hard to “unfiddle”