user1261350
user1261350

Reputation: 11

Bounding box and collision detection code snippets for Adobe flash professional Cs5.5

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

Answers (1)

sav
sav

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

Related Questions