Reputation: 11
I am creating a very basic Game in Flash Professional CS5.5 and wanted to know if anybody had any Code Snippets for a bounding box for the character, and a collision detection Code Snippet.
The game consists of a player moving out the way to avoid cars and other obstacles while getting scored for how long they run.
Upvotes: 1
Views: 412
Reputation: 2152
ours is 3D, C# Ape physics the entire engine is here
take a look at convex hull and environment
we used a bounding volume hierarchy
a simple method of optimisation is to put a sphere around every object. when testing two objects for a collision, check if the centers of the objects are within the radius range. if the bounding spheres don't collide then no more work needs to be done.
Upvotes: 0