I'm trying to algorithmically create a softbody circle using code.
I've managed to create the circle properly

when the bodies are static

They all appear to be linked when I check with print statements. They link to the center point correctly I believe, but when the bodies are set off of static they freak out and fling everything around.

when the bodies are set to rigid

when the center node is static and the outside ones are rigid they all slink down like they should

I've been scratching my head for hours this to me seems like it should work in theory

``````extends RigidBody2D

var count = 20
var center = Vector2(0,0)
var col_points = []

var step = 2 * PI / count

var points = [Vector2()]
# Declare member variables here. Examples:
# var a = 2
# var b = "text"

# Called when the node enters the scene tree for the first time.
points.resize(count)
col_points.resize(count)

for n in range(count):
var spawn_pos = center + radius.rotated(step * n) #spot to spawn the segment
var seg_spawn = col.instance() #creates a instance of segment of the soft body child nodes are spring mid, spring clock, spring counter

add_child(seg_spawn) #spawn's segment of the soft body
seg_spawn.set_position(spawn_pos) #sets the postion of the soft body segment

seg_spawn.get_node("mid").set_node_a(seg_spawn.get_path()) #current generated segment
seg_spawn.get_node("mid").set_node_b(self.get_path()) #center segment
col_points[n] = seg_spawn
points[n] = spawn_pos

for n in range(count):

if(n < count-1):
#links current segment to next segment

print(col_points[n].get_node("clock").get_node_a())
print(col_points[n].get_node("clock").get_node_b())
print("===========")
else: