How to make better softbodies in 2D

I’ve been experimenting with 2D softbodies and ran into a roadblock. Many online resources, like Walaber’s JellyCar devlogs outline collisions between the softbody’s segments, which are also the springs.

These segments are able to compress relatively to each other but also collide, which I have found difficult to recreate in Godot.

Currently, I have these softbodies made of circles, but I would like for it to be made of segments. I tried connecting a loop of rigidbodies with segment shapes using PinJoint2D but these rigidbodies aren’t able to compress relatively to each other. Any ideas of how to solve this issue?

This plugin goes over how it creates soft bodies in 2D, similar to your implementation, but using an area of rigidbodies instead of only the edges.

1 Like

Yeah, I looked at the plugin earlier, and their technique also works. The reason I think my hollow approach would be better for my situation is that I want map geometry to be softbodies as well, and making the softbodies hollow would save a lot on rigidbody nodes. The problem is that with a shell made of circles, a softbody-softbody collision would be unstable as they could pass through each other easily, which is why I am looking for a segment approach. Thanks for the reply!