TileMap.worldToMap

Returns the tilemap (grid-based) coordinates corresponding to the given local position. To use this with a global position, first determine the local position with Node2D.toLocal:

More...
struct TileMap
@nogc nothrow const
Vector2
worldToMap
(
in Vector2 world_position
)

Detailed Description

var local_position = my_tilemap.to_local(global_position) var map_position = my_tilemap.world_to_map(local_position)

Meta