Phaser API Documentation

removeTileAtWorldXY(worldX, worldY, [replaceWithNull], [recalculateFaces], [camera])


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


name type arguments Default description
worldX number

The x coordinate, in pixels.

worldY number

The y coordinate, in 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.

camera Phaser.Cameras.Scene2D.Camera <optional>

The Camera to use when calculating the tile index from the world values.


The Tile object that was removed from the given location.

Since: 3.50.0