Timing using state.get_step()

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By keke
:warning: Old Version Published before Godot 3 was released.

Is it ok to do something like:

heat-=state.get_step()*COOLING_RATE

I know I can use timers, but I was wondering if the above will time consistently, or if it will vary from machine to machine…

:bust_in_silhouette: Reply From: avencherus

Yes. The delta from the physics state is a fixed time step from the game loop. So it should consistently reflect (1 second / frames per second) for every machine.