Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

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.

Parameter Type
layer TileLayerOptions
point Vector3Like

Readonly<TileAtPoint> | null

const under = findTileAt(map.layers[0], position);
if (under && under.tileSet.properties.get(under.tile)?.kind === "lava") burn();