The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

+1 vote

Has anyone an idea, why no matter what I'm doing, the function _integrate_forces stops working as soon as the object (rigidbody) the script with the function in it is attached to isn't moving anymore? _process and _fixed_process (as well in the same as in other scripts) continue their business

in Engine by (35 points)

Can you check if that body is sleeping?

It's not when hitting play, and there is no code which could cause it to be. For testing purposes, I just put a timer in _integrate_forces and one in each of the process functions. The first stops as described, while the other both go on

If forces/velocities stop interacting with the body, it will be put to sleep, then you need to wake it up for it to accept changes on the state.

Thank you for the information

There is a property for preventing sleep (can_sleep, I think), it will make the body to be processed on every physics frame even when the state is not active, that is not recommended if there will be many bodies on the scene (if is better to wake up the bodies or prevent sleep will depend on the game).

Please log in or register to answer this question.

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.