My question builds off of one of the answers to this question:
I wanted to update the rest position (i.e. the position where the two objects are attached) of a PinJoint2D on moving one of the objects it's attached to. To do so, I tried out Thomas's answer to the linked question.
disable_collision twice didn't affect the rest position, presumably because the value is still the same at the end of the frame being processed. Instead, I tried out calling
node.remove_child(joint) and then
node.add_child(joint) to try and get it to update. This caused the joint to detach entirely. On viewing the node in the debugger at a future frame, I can see that the joint's still a child of the node, and it still has the same
Why would resetting the joint's parental hierarchy cause it to detach, and how can I prevent it? It would make sense if the node no longer had the same relative path to either
node_b, but it's been re-parented to the same parent in this case.