Here is what I am trying to do:
I want to have 10 or so stationary polygons in the level with which the ball collides and reacts to physics.
Here is what I have so far:
1) Vertex coordinates for each of the polygons
2) Code to read in these coordinates from text file and do a PixelToMeters conversion on them
3) Code to use the EarClipping decomposition to break each of these polygons
4) I add each of the broken polygons (25 or so for each of the 10 polygons) as a static Body
List<Vertices> polygons = EarclipDecomposer.ConvexPartition(tempVertices);
foreach (Vertices polygon in polygons)
Body polygonBody = BodyFactory.CreatePolygon(world, polygon, 1f);
polygonBody.BodyType = BodyType.Static;
polygonBody.Restitution = 0.3f;
polygonBody.Friction = 0.5f;
Here is what I am confused on:
1) They're not being grouped up right for some reason because the ball is reacting oddly. How does the "origin" thing work for CreatePolygon method?
2) How the heck do I SEE where the polygons are?