I want to temporarily connect multiple RigidBody2D objects in a Godot 2D scene so they move together as one rigid body, and later split them up again.

I have basically managed to do so by dynamically creating two PinJoint2D instances and pointing them to the two rigid bodies. This way, the two rigid bodies are now connected to what looks and behaves like one rigid body.

However, now I want to vary the relative positions of the two rigid bodies with respect to one another. How do I do this? I have tried to modify the transform/position of the PinJoint2D instances, but this does not appear to have any effect.



You must log in to answer this question.

Browse other questions tagged .