Polygon vertices as Vec2[] or GeomPoly. Must form a
simple (non-self-intersecting) polygon with at least 3 vertices.
Optionaloptions: ConcaveBodyOptionsOptional configuration (body type, material, filter, etc.)
A Body containing one or more convex Polygon shapes.
Create a
Bodyfrom concave (non-convex) polygon vertices.Accepts arbitrary simple polygon vertices (concave or convex), performs validation, optional simplification, and convex decomposition via
GeomPoly.convexDecomposition(). Each convex partition becomes aPolygonshape on the returned body.If the input is already convex, a single
Polygonshape is created (no decomposition overhead).