Thursday, September 24, 2015

Bouncing Ball


Source
Ball bouncing in 3D in openGL, constrained in the x, y, z directions at a maximum ceiling and floor. If the ball would have passed that direction maximum, it's position and velocity are set to simulate bouncing. Eulerian integration is used to solve for the position and velocity. On each bounce, the ball's rotation is set based on the velocity not in the impact direction.

No comments:

Post a Comment