A Collider wrapper around Polygons to enable using those for hit-testing testing.

Constructor

@:value({ isConvex : false })new(polygons:Polygons, isConvex:Bool = false)

Create new PolygonCollider with specified Polygons and flag to check as convex or concave.

Variables

isConvex:Bool

Whether Polygons is convex or concave. Convex polygons are cheaper to test against.

polygons:Polygons

The Polygons instance used for collision checks.

Methods

contains(p:Point):Bool

Test is Point p is inside polygons.

Inherited Variables

Inherited Methods