Tilemap layers have methods which allow you to convert world coordinates of a given Camera to tile coordinates on the layer - worldToTileX
, worldToTileY
, and worldToTileXY
. If you can figure out where on the world the player has clicked, you can figure out the position’s tile coordinates. Note that Pointers can also give you world coordinates.
1 Like