B2CREATEPOLYGONSHAPE

This command will create a polygon shape with vertices at the specified points.  You may specify up to 8 points, but you do not have to use that many.  The polygon must be convex or errors could occur.  This shape only exists to be added onto a body template, it cannot interact with bodies or other shapes.

The command returns an integer handle for the created shape.  You must store this value or you cannot add the shape onto any templates.

 

Syntax

Return as Integer = b2CreatePolygonShape(X1 as Float, Y1 as Float, X2 as Float, Y2 as Float, ... X8 as Float, Y8 as Float, )

Related Information

BOX2D Commands Menu
Index