2D Toolkit Forum
2D Toolkit => Support => Topic started by: iopixel on December 23, 2012, 10:00:03 pm
-
Hi,
I can do this myself using the camera / tilemap parameters but before doing it, can you tell me there is a method to convert a world coordinate to a tile coordinate ?
Thanks !
-
tileMap.GetTileFracAtPosition will transform a tile position from world -> tile space. The rounded / floored x & y values should give you the tile indices in both axes. The function returns false if the world position is out of bounds.
-
Great, thanks !