I'm trying to create a 2d game with some custom player dynamics where the player is made up of interacting nodes that have some custom physics operating on them, perhaps layered on top of "ball and spring" type physics. So this is sort of a 2d ragdoll thing I think. I'm basically just trying to understand what's going on in the game engine at this point. Here's the code I've got that basically just uses a KinematicBody2d more or less following this https://www.davidepesce.com/2019/10/02/godot-tutorial-6-physics-and-collisions/. Ultimately, I want to define some attractive and/or repulsive forces acting among the nodes but for now we just have them offset by a fixed amount.
func _ready():
var otherSeg = KinematicBody2D.new()
otherSeg.transform.origin = Vector2(80, 60)
var otherSegSprite = Sprite.new()
otherSegSprite.texture = load("res://wormseg1.png")
var otherSegCollider = CollisionShape2D.new()
otherSegCollider.shape = CircleShape2D.new()
otherSegCollider.shape.radius = 50
otherSeg.add_child(otherSegCollider)
otherSeg.add_child(otherSegSprite)
self.add_child(otherSeg)
So I get two identical nodes, offset by (80,60), that I can control with the keyboard which is good. I've added an obstacle which is a StaticBody2D. The problem is that, while the obstacle stops the main player node, the one created in the script ("otherSeg") just passes right through even though it has a collider. Can anyone see what's wrong?