Tuesday, August 5, 2014

Poly2tri and Box2D

Using poly2tri to triangulate complex polygons, then using the triangles to form Box2D bodies with multiple fixtures (triangle=>fixture). Box2D only supports convex polygons, this way I can make concave ones too. This way I could simulate almost pixel perfect collision, but that is overkill in most cases.

No comments:

Post a Comment