Phaser API Documentation

<static> RemoveTileAt(tileX, tileY, replaceWithNull, recalculateFaces, layer)


Removes the tile at the given tile coordinates in the specified layer and updates the layer's collision information.


name type description
tileX number

The x coordinate.

tileY number

The y coordinate.

replaceWithNull boolean

If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.

recalculateFaces boolean

true if the faces data should be recalculated.

layer Phaser.Tilemaps.LayerData

The Tilemap Layer to act upon.


The Tile object that was removed.

Since: 3.0.0