tmWorldToTileY

Turns a y position into a tile row on a square map. On an isometric map it takes a grid y. For a world position on those maps, use tmTileYAt. Takes map (The map's handle), worldY (The world y position, in pixels). Returns: The row. It can be outside the map.

Tilemap

Parameters & Returns

Parameters

map Int
worldY Int

Returns

Int

Quick Summary

Turns a y position into a tile row on a square map. On an isometric map it takes a grid y. For a world position on those maps, use tmTileYAt. Takes map (The map's handle), worldY (The world y position, in pixels). Returns: The row. It can be outside the map.

Technical Exegesis...

Turns a y position into a tile row on a square map. On an isometric map it takes a grid y. For a world position on those maps, use tmTileYAt.

See the Tilemaps guide.

Returns: The row. It can be outside the map.

Example

Example.bam
cy = tmWorldToTileY(map, camY + inpGetMouseY())