Thanks for the comments, glad you enjoyed it
I'm reluctant to release code at the moment as some bits are messy to say the least! Going to give it a much of a rewrite when i fix the bugs before starting on the main game.
Here is the mesh creation code though, the polygons are all convex so they can be easily constructed out of triangles:
For i = 1 to PolygonCount
`Box2D Stuff
`Create 3D Shape
For j = 1 to PolygonVertexCount(i)
For k = 0 to 1
If j > 2
Inc Limb
Make Object Triangle tObj,Polygon(i,1).X,Polygon(i,1).Y,0,Polygon(i,j+k-1).X,Polygon(i,j+k-1).Y,0,Polygon(i,j+(1-k)-1).X,Polygon(i,j+(1-k)-1).Y,0
MakeLimbFromObject(tObj,Obj,Limb)
Offset Limb Obj,Limb,0,0,0.5-k
Color Limb Obj,Limb,Colour
Endif
Inc Limb
a = j+k : If a > PolygonVertexCount(i) then a = 1
b = j+1 : If b > PolygonVertexCount(i) then b = 1
Make Object Triangle tObj,Polygon(i,j).X,Polygon(i,j).Y,0.5,Polygon(i,a).X,Polygon(i,a).Y,-0.5,Polygon(i,b).X,Polygon(i,b).Y,k-0.5
MakeLimbFromObject(tObj,Obj,Limb)
Color Limb Obj,Limb,Colour
Next k
Next j
Set Object Normals Obj
Next i
About this code: Are limbs efficient? Or should I aim for a single mesh (just one limb)
What would you like to see about the drawing code?