Difference between _process and _physics_process and can I have both in the same script

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Abdulelah444

Hi…

What is the difference between _process(delta) and _physics_process(delta) ?
is delta the same in both functions?
can I have both functions in the same script without causing me problems?

:bust_in_silhouette: Reply From: estebanmolca

There is no problem in having both in the same script.
_physics_process (delta): Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the delta variable should be constant.
_process(delta): Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the delta time since the previous frame is not constant

what is the difference between _PhysicsProcess and _Process