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"]}); Copy
const tilemapCollider = new TilemapCollider({ composite: true, offset: new Vector2(), layer: "CollisionLayer", physics: true, ignoreCollisionsWithLayer: ["IgnoredLayer"]});
Optional
Generate colliders that represent the outer lines of the tile map
Ignores collisions with layers in the array
Collision layer
X-Y axis offset
TRUE if this collider interact with rigid bodies
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.
Example