Configuration object for PolygonCollider creation
const polygonCollider = new PolygonCollider({ vertexModel: [new Vector2(0, 16), new Vector2(16, 16), new Vector2(16, 0), new Vector2(0, 0)], rotation: 0, offset: new Vector2(), layer: "CollisionLayer", physics: true, ignoreCollisionsWithLayer: ["IgnoredLayer"]}); Copy
const polygonCollider = new PolygonCollider({ vertexModel: [new Vector2(0, 16), new Vector2(16, 16), new Vector2(16, 0), new Vector2(0, 0)], rotation: 0, offset: new Vector2(), layer: "CollisionLayer", physics: true, ignoreCollisionsWithLayer: ["IgnoredLayer"]});
Ignores collisions with layers in the array
Collision layer
X-Y axis offset
TRUE if this collider interact with rigid bodies
Edges rotation in radians
Collection of 2d vectors representing the vertices of the collider
Configuration object for PolygonCollider creation
Example