Phaser API Documentation

removeTileAt(tileX, tileY, [replaceWithNull], [recalculateFaces])


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


name type arguments Default description
tileX number

The x coordinate, in tiles, not pixels.

tileY number

The y coordinate, in tiles, not pixels.

replaceWithNull boolean <optional> true

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

recalculateFaces boolean <optional> true

true if the faces data should be recalculated.


A Tile object.

Since: 3.50.0