API Reference › Map — tilemap › Map.to_tile
method

Map.to_tile

Map.to_tile(pixel: IVec2) -> IVec2

Divides a pixel position by the tile size of the Solids config.

Example

# doc-check: skip — illustrative
let tile = Map.to_tile(pixel: Collider.center(player))
← All symbols