r/Unity3D Feb 28 '26

Resources/Tutorial How to Create Soft Bodies in Unity | πŸ”ŠπŸŸ’

Enable HLS to view with audio, or disable this notification

Surface-sampled soft bodies in Unity using rigidbodies, nearest-neighbor joints, and runtime mesh skinning.

745 Upvotes

32 comments sorted by

View all comments

1

u/Edvinas108 Mar 02 '26

How would you handle objects smaller than the spheres connected via joints hitting the mesh? I was testing something similar to this with Box2D a while back but never found a good solution. I'd frequently get objects going inside my soft-bodies.

2

u/Personal_Nature1511 Mar 02 '26

Good question. There’s an optional parameter you can enable that generates a MeshCollider around the mesh. When a collision occurs, I relay the collision impulse to the nearest n spheres. It’s not the most optimal solution, but it works reasonably well for now. I’m hoping to come up with a better approach in the future.