Ball Rolling On Surface - Rhino Palooza Part 3
Just a quick (but in my opinion visually impressive) update to the rolling ball, contact with a ground plane.
The ground contact is actually achieved fairly easily. instead of using the position of the control to drive the position of the ball directly, we put it through a node network.
We find the closest point on surface to the controls position
We get the normal vector at that point.
We add the normal vector to the position (we would need to scale the normal if the ball had a radius other than 1) (this step makes sure that all parts of the ball are outside of the surface).
We use that sum as the position of the ball.
I think this will be my final iteration of the rolling ball in terms of setup, so if I do make a part 4 it will just be packaging everything together into a script.