Phaser API Documentation

  Version: 
getIsoTileAtWorldXY(worldX, worldY, [originTop], [nonNull], [camera])

Description:

Gets a tile at the given world coordinates from the given isometric layer.

Parameters:

name type arguments Default description
worldX number

X position to get the tile from (given in pixels)

worldY number

Y position to get the tile from (given in pixels)

originTop boolean <optional> true

Which is the active face of the isometric tile? The top (default, true), or the base? (false)

nonNull boolean <optional> false

If true, function won't return null for empty tiles, but a Tile object with an index of -1.

camera Phaser.Cameras.Scene2D.Camera <optional>

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

Returns:
Description:

The tile at the given coordinates or null if no tile was found or the coordinates were invalid.

Since: 3.60.0