Category: Tilemap — Queries
Syntax:
tmWorldToTileX:Int(map:Int, worldX:Int)
The column. It can be outside the map.
Turns an x position into a tile column on a square map. On an isometric map it takes a grid x. For a world position on those maps, use tmTileXAt.
See the Tilemaps guide.
cx = tmWorldToTileX(map, camX + inpGetMouseX())
BambooBasic © 2026 Michael Denathorn