Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Exxion |
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?