Phaser API Documentation

  Version: 
getTilesWithinWorldXY(worldX, worldY, width, height, [filteringOptions], [camera])

Description:

Gets the tiles in the given rectangular area (in world coordinates) of the layer.

Parameters:

name type arguments description
worldX number

The world x coordinate for the top-left of the area.

worldY number

The world y coordinate for the top-left of the area.

width number

The width of the area.

height number

The height of the area.

filteringOptions Phaser.Types.Tilemaps.FilteringOptions <optional>

Optional filters to apply when getting the tiles.

camera Phaser.Cameras.Scene2D.Camera <optional>

The Camera to use when factoring in which tiles to return.

Returns:
Description:

An array of Tile objects found within the area.

Type:
Since: 3.50.0