Help needed! Soft collision with kangaroo

Hi everybody!

I am stuck on trying to have soft bubbles collide with eachother in a box.

I attached my current script. Currently the bubbles will collide with the wall of the box but I cant get them to collide with eachother. I tried to add collision with a Curvepointcollide node but it doesnt work.

Is there anyone that can help me out?


Collision project.gh (8.7 KB)

Thanks!

Hi @Fenno

Try this, using Collide2d
Collision project.gh (17.5 KB)

Thanks Daniel!

You’re awesome

1 Like

Hi Daniel,

Is there a way that I can anchor the center of the circles so they inflate from that centerpoint when I increase the polygon area and don’t drift away?

Thanks again, your help is much appreciated!

I tried to use the centroid of the circle geometry on the P input of an anchor node. I also tried to use the center of the polyline’s. But they don’t work.

Collision project2.gh (28.1 KB)
For soft bodies like this we don’t automatically have a centroid or frame we can anchor, but we can create a point and attach it to all the points of the curve with spokes like a bicycle wheel.

In the above definition I’ve also switched from Collide2D(which checks the points of each polyline for containment in the other) to Collider(which treats every segment as a capsule and does collision between these), as it is more stable here. This does mean the curves behave as though they have a thickness, but you can offset by the same amount at the end if you want them to actually touch.

1 Like

Thanks Daniel, this is so helpfull.

You really helped me out here.