Skip to content

Class

PlacementPositioning2DUtils

Generated GDScript class reference for GridPlacement.PlacementPositioning2DUtils.

Status
Current
Version
v6.1.0
Source updated
2026-09-24
Generated on
2026-09-23

Static 2D grid positioning helpers: world/viewport/tile conversion, tile- center movement, viewport-center snapping, distance-limited movement, and direction-to-tile-delta. Pure functions, extracted from GridPositioner2D. [b]Camera2D required[/b] for screen-to-world projection: without a current enabled Camera2D, projection returns a non-finite position.

Source: addons/grid_placement/utils/placement_positioning_2d_utils.gd

Syntax

class PlacementPositioning2DUtils extends RefCounted

Members

NameKindSummary
successPropertyProjection result with explicit success/error; world origin stays a normal value.
world_positionProperty
errorProperty
get_tile_from_global_positionMethod
move_to_tile_centerMethod
seat_object_on_cellMethod
move_to_closest_valid_tile_centerMethod
limit_tile_to_max_distanceMethod
is_region_validMethod
snap_tile_to_regionMethod
get_tile_from_node_positionMethod
move_node_by_tilesMethod
convert_screen_to_world_positionMethod
viewport_center_to_world_positionMethod
move_node_to_tile_at_viewport_centerMethod
direction_to_tile_deltaMethod