0 votes

I'm aware of how to safely move a single RigidBody2D through _integrate_forces(), but how do you do this correctly when the body is attached to another with a joint? Directly setting the second body's position obviously doesn't work, but neither does changing its Physics2DDirectBodyState, either inside its _integrate_forces() or outside it. The only solution I've found is to parent the second body to the first and set it to MODE_STATIC for one frame. This works, but means the second object doesn't move for a frame. Is there a way to do this seamlessly, or is freezing the second object like that required?

in Engine by (14 points)

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 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 webmaster@godotengine.org with your username.

Categories