I am a beginner in Godot Engine, and I'm performing some experiments .
I have a problem to create dynamic objects though GDScript..
In the small attached project example , I've created with no problems instances of objects , connected by PinJoint2D . When I added, from code, additional instances of objects, they are not connected by joints .
In the example there is a snake consists of a head and two body parts (added manually as instance from editor).
Then, from code if I add many more pieces. They are properly displayed but are not connected to the rest of the snake (as shown in the figure, when moving the head). Where is the issue? I'm going crazy. Thanks for the help.