Hi Wave,
In the game I am developing the polygons are very complex and the collision algo in the code above would be erroneous. A collision hull is a simple polygonal representation of the complex poly. I use the Hull to check for collisions which is much faster as it has fewer points to check and is a true convex polygon.
Here is a screenie of an early version of the editor to demonstrate. The Blue Lines are the collision hull.
In the game I am developing the polygons are very complex and the collision algo in the code above would be erroneous. A collision hull is a simple polygonal representation of the complex poly. I use the Hull to check for collisions which is much faster as it has fewer points to check and is a true convex polygon.
Here is a screenie of an early version of the editor to demonstrate. The Blue Lines are the collision hull.