Phaser API Documentation

calculateFacesAt(tileX, tileY, [layer])


Calculates interesting faces at the given tile coordinates of the specified layer. Interesting faces are used internally for optimizing collisions against tiles. This method is mostly used internally to optimize recalculating faces when only one tile has been changed.

If no layer is specified, the maps current layer is used.


name type arguments description
tileX number

The x coordinate, in tiles, not pixels.

tileY number

The y coordinate, in tiles, not pixels.

layer string | number | Phaser.Tilemaps.TilemapLayer <optional>

The tile layer to use. If not given the current layer is used.


Returns this, or null if the layer given was invalid.

Since: 3.0.0
Source: src/tilemaps/Tilemap.js (Line 1669)