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,PlacementRulebase,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 RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
get_tile_from_global_position | Method | |
move_to_tile_center | Method | |
get_tile_from_node_position | Method | |
snap_tile_to_bounds | Method |