Interface EdgeColliderOptions

Configuration object for EdgeCollider creation

const edgeCollider = new EdgeCollider({
vertexModel: [new Vector2(0, 16), new Vector2(16, 16)],
rotation: 0,
offset: new Vector2(),
layer: "CollisionLayer",
physics: true,
ignoreCollisionsWithLayer: ["IgnoredLayer"]
});
interface EdgeColliderOptions {
    ignoreCollisionsWithLayers: string[];
    layer: string;
    offset: Vector2;
    physics: boolean;
    rotation: number;
    vertexModel: Vector2[];
}

Properties

ignoreCollisionsWithLayers: string[]

Ignores collisions with layers in the array

layer: string

Collision layer

offset: Vector2

X-Y axis offset

physics: boolean

TRUE if this collider interact with rigid bodies

rotation: number

Edges rotation in radians

vertexModel: Vector2[]

Collection of 2d vectors representing the vertices of the collider