This post is related to a post I made a few days ago titled Ball Bouncing off Line Calculation.
The code used to determine the collision reaction of a ball bouncing off of a line shown in the previous post is the same as the code required to do it in 3D! So, you can achieve a ball bouncing off of a plane. Or, when you add gravity plus a little damping on the floor you can have things rolling around.
This example was designed so the ball would hopefully roll for a long time without rolling off. But if the ball was going a little faster you’d see how it can bounce into the air a bit if it hits an incline fast. Anyway, just thought I’d share!
(marble madness anyone?)
Note: if it seems a little slow, it is probably the 5 other blogs on this page that are running more intense things.
Leave a comment