Generates rectangle colliders for the map edge tiles (or lines if composite is TRUE).
Limitations: At the moment, it is not possible to modify the shape of the collider once it has been generated.

const tilemapCollider = new TilemapCollider({
composite: true,
offset: new Vector2(),
layer: "CollisionLayer",
physics: true,
ignoreCollisionsWithLayer: ["IgnoredLayer"]
});

Implements

Constructors

Properties

composite: boolean = true

Generate colliders that represent the outer lines of the tile map

ignoreCollisionsWithLayers: string[] = []

Ignores collisions with layers in the array

layer: string = ""

Collision layer

offset: Vector2 = ...

X-Y axis offset

physics: boolean = true

TRUE if this collider interact with rigid bodies