Between _process(delta)
and _fixed_process(delta)
, which virtual function should be used to run intensive computations that happen as fast as possible, to save CPU and to keep the FPS high?
An example would be, regenerating the health of a player continuously.
# This?
func _process(delta):
health = min(health + 5*delta, 100)
# Or this?
func _fixed_process(delta):
health = min(health + 5*delta, 100)
Which one should be preferred for performance?