Topic was automatically imported from the old Question2Answer platform.
Asked By
Abgenullt
Hi,
I wonder, when the engine is updating its input state?
In Unity (Which I used before), you may miss some inputs, if you query them in Unitys “_physics_process” function, because the engine updates the input state once a frame and this is not always a tick of the physics engine.
So, I try to find out, if this is a potential problem in Godot, too. But I don’t find much information about how the game loop works internally.
Ok, first of all: If you don’t want to miss a thing, then you can use event driven Input Management:
To my personal experience I would say that input actions are event driven and therefore don’t care much about screen frames. Anyway, you’re free to have a look at the source code yourself:
I didn’t go very deep but I can at least see that physics_frames are taken into account:
(from main/input_default.cpp)