B2.PolygonShape:set

From GiderosMobile
Revision as of 10:46, 23 August 2018 by Hgy29 (talk | contribs)

Available since: Gideros 2011.6

Description


Copy vertices. This assumes the vertices define a convex polygon. It is assumed that the exterior is the the right of each edge.

 b2.PolygonShape:set(vertices)

Parameters

vertices: (any) A list of numbers that contains the x, y coordinates of the vertices sequentially

Examples

Example

local polygonShape = b2.PolygonShape.new()<br />
polygonShape:set(1,4, 2,6, 3,7)<br />