Reference

PPPoly

Description

Create a concave polygon shape. By defaults, it creates a star. 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 concave and has at least 3 points.

Exemples

PPPoly myPoly1 = new PPPoly();
myPoly1.setPosition(100, 100);
myPoly1.vertex(-5, -15);
myPoly1.vertex(5, -15);
myPoly1.vertex(15, -5);
myPoly1.vertex(15, 5);
myPoly1.vertex(5, 15);
myPoly1.vertex(-5, 15);
myPoly1.vertex(-15, 5);
myPoly1.vertex(-15, -5);
world.add(myPoly1);

Syntax

PPPoly();

Parameters

none