Skip to content

Class

PlacementPositioning3DUtils

Generated GDScript class reference for GridPlacement.PlacementPositioning3DUtils.

Status
Current
Version
v6.2.1
Source updated
2026-09-24
Generated on
2026-10-22

PlacementPositioning3DUtils Static utility functions for 3D grid-based positioning and tile movement operations. 6.0.0-3D-Surface (Wave B1.1): 3D mirror of PlacementPositioning2DUtils. Covers the math the GridPositioner3D needs; the 2D viewport-center + screen-to-world helpers are NOT mirrored because 3D uses Camera3D ray-casts (via GridCellRaycaster3D's math) instead of 2D's Camera2D canvas-transform projection. Differences from 2D: - Vector2 / Vector2i → Vector3 / Vector3i - Node2D / TileMapLayer → Node3D / GridMap - Rect2i (map bounds) → AABB (GridMap does not expose Rect2i; the 3D utils use GridMap.get_used_cells() to derive bounds when needed, or callers pass a precomputed bounds)

  • No 8-direction tile delta: 3D is 6-direction (or 26-direction with diagonals); the 3D manipulation service provides direction-to-tile mapping in Wave B2. The data layer (PlacementSession, PlacementSession, PlacementRule base, ValidationResults) is already dimension-agnostic; this file is the engine-facing math layer.

Source: addons/grid_placement/utils/placement_positioning_3d_utils.gd

Syntax

class PlacementPositioning3DUtils extends RefCounted

Members

NameKindSummary
get_tile_from_global_positionMethod
move_to_tile_centerMethod
get_tile_from_node_positionMethod
snap_tile_to_boundsMethod