screenToTile
Returns the TileCoordinate of the tile at the given screen position on the specified z-plane.
Chains screenToWorld with toTileCoordinate. The elevation parameter specifies which horizontal z-plane to intersect during inverse projection — for flat tile grids this should be 0.0 (the default). For elevated terrain, pass the surface height of the expected tile layer.
For complex terrain where elevation varies per tile, use screenToWorld directly and call toTileCoordinate with the appropriate elevation after determining the layer through other means.
Parameters
Screen x-coordinate of the tap (px)
Screen y-coordinate of the tap (px)
Width of the scene viewport (px)
Height of the scene viewport (px)
World units per tile side (default 1.0)
Z-plane to intersect during inverse projection (default 0.0)
World position of the grid's (0,0) corner (default Point.ORIGIN)