findTileAt
findTileAt(
layer,point):Readonly<TileAtPoint> |null
The tile of layer under point, its height off the plane ignored, or
null where the cell is empty or off the layer: Godot’s local_to_map
with get_cell_tile_data, Unity’s WorldToCell with GetTile. A
system reads it for a footstep, a damage floor or a field to dig, from
the same layer it hands TileMapLayer. Written in place: read it at
once.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
layer |
TileLayerOptions |
point |
Vector3Like |
Returns
Section titled “Returns”Readonly<TileAtPoint> | null
Example
Section titled “Example”const under = findTileAt(map.layers[0], position); if (under && under.tileSet.properties.get(under.tile)?.kind === "lava") burn();