Wednesday 18 May 2011

Cylinder Collision

I've just finished tidying up my code following a change I had been planning to do for some time.  I've changed the collision bounds for characters from multiple spheres to a single cylinder.

The red outlines in the following picture best illustrate what I mean.

Although cylinder to cylinder and cylinder to sphere collision is a tiny bit slower to calculate than sphere to sphere collision the end result has made the overall code much more efficient.  There are far fewer iterations and less calls to the final physics bounce calculations.

Another minor distraction from getting the animations done!

No comments: