Grasshopper Kangaroo, falling ball in a Track

I’m trying to create a physics simulation in Grasshopper using Kangaroo 2. I have a rail track made of 4 small rods (thin cylindrical bars arranged to form a track). I want to add a sphere that falls onto these rods and rolls along them under gravity.

The problem is the physics are not working correctly. The sphere either falls straight through the rods, behaves unpredictably, or doesn’t register proper collision. I suspect the issue is that Kangaroo 2 collision detection works best with closed meshes, and my thin rod geometry is causing problems. ((((( the kangroo is in light blue teal color at the bottom right of the command and you can draw a curve ad set it, the idea to make the ball fall normal like in real life

###6in Ball Final###.gh (47.2 KB)

Hi,

Are you sure you posted the right file?
This one doesn’t have any Kangaroo in it

for mcneel.gh (16.2 KB)

So I am trying for this ball to follow realistic Physics, while traveling along the track.

Thank you :slight_smile:

If I’m understanding right, the 4 rails contain the ball like a tube. A simple way to model this would be to take the centreline and constrain the ball centre to lie on that:
balltrack.gh (14.1 KB)

2 Likes

yeah this is beautiful, now I guess the challenge is to give the ball the mass. so if there is gaps in the track it actually falls, If you have any suggestions or advice please let me know thank you .