How to set node_b for pinjoint2d during run time without off setting it

Godot Version

Replace this line with your Godot version

Question

During run time I try setting a pinjoint2d's node_b to a rigidbody2d but when I do there is a big offset because the rigidbody2d wasn't right on top of the pinjoint2d. When I try to set the global_position of the rigidbody2d to the pinjoint2d it doesn't seem to care, instead just pinning them together as if I didn't change the position. How can I get this to work?

From your description I can’t really tell what you are trying to achieve, can you give an example of what is happening through images or video? Is there code involved?

its seems I have fixed it, I’m not sure how I have but it works now, might have been a glitch or something I did wrong by mistake.

1 Like