Sets collision on the tiles within a layer by checking each tile's collision group data
(typically defined in Tiled within the tileset collision editor). If any objects are found within
a tile's collision group, the tile's colliding information will be set. The collides
parameter
controls if collision will be enabled (true) or disabled (false).
name | type | description |
---|---|---|
collides | boolean |
If true it will enable collision. If false it will clear collision. |
recalculateFaces | boolean |
Whether or not to recalculate the tile faces after the update. |
layer | Phaser.Tilemaps.LayerData |
The Tilemap Layer to act upon. |