0 votes

On the official godot documentation it says that the physics_process() method is executed before each physics step. But what exactly does it mean that "it is executed before each physical step"?

Godot version 3.2.3
in Engine by (54 points)

1 Answer

+2 votes

Godot's physics process is constantly running, at approximately sixty times a second - each "physical step" is 1/60th of a second.

SO anything that you put in physics_process() will happen sixty times a second, meaning it'll be a major use of processing resources - it's good for things like motion that are constantly happening, but other actions should be distributed to other functions (ie. if you have a health meter, it doesn't need to constantly be checking the player HP - set it at the start, and update it every time player HP changes).

Hope this helps!

by (162 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.