Reference

PPConvexPoly

Description

Create a convex polygon shape. By defaults, it creates a triangle. Use the vertex() function to create a custom shape. When creating a basic shape, remember that the gravity center and the drawing center is the (0,0) of your shape. Also be sure that your polygon is convex and has at least 3 points.

Exemples

PPConvexPoly myPoly1 = new PPConvexPoly();
myPoly1.vertex(-20, -10);
myPoly1.vertex(20, -10);
myPoly1.vertex(0, 10);
world.add(myPoly1);

Syntax

PPConvexPoly();

Parameters

none