Category: Tilemap — Queries
Syntax:
tmRayCast:Int(map:Int, layer:Int, x1:Int, y1:Int, x2:Int, y2:Int, flags:Int)
1 if it hits, otherwise 0.
Looks along a line for the first tile with these flags, respecting tile shapes and flips. On an isometric map the line is in grid pixels, and on staggered and hexagonal maps this returns 0. tmHitWorldX and tmHitWorldY give the point where the line reached it.
See the Tilemaps guide.
canSee = 1 - tmRayCast(map, ground, ex, ey, px, py, 1)
BambooBasic © 2026 Michael Denathorn