tmHitWorldX

Category: Tilemap — Queries

Syntax:

tmHitWorldX:Int()



Returns

The world x position.



Summary

After a hit: the world x. For a box it's the tile's corner, or for a shaped tile the first solid pixel found; for a ray it's where the line reached the tile.

See the Tilemaps guide.



Example
x = tmHitWorldX()

BambooBasic © 2026 Michael Denathorn