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 [GridPositioner3DSpike]'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 [method 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 ([PlacementContainer], [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 RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
get_tile_from_global_position | Method | |
map_position | Property | |
move_to_tile_center | Method | |
tile_center_local | Property | |
tile_center_global | Property | |
get_tile_from_node_position | Method | |
local | Property | |
move_node_by_tiles | Method | |
current_tile | Property | |
new_tile | Property | |
get_tile_world_center | Method | |
get_used_bounds | Method | |
cells | Property | |
cell_size | Property | |
min_pos | Property | |
max_pos | Property | |
local | Property | |
snap_tile_to_bounds | Method | |
cells | Property | |
min_tile | Property | |
max_tile | Property | |
direction_to_tile_delta | Method | |
n | Property | |
sx | Property | |
sy | Property | |
sz | Property |
Source
addons/grid_placement/utils/placement_positioning_3d_utils.gd
Plugin docs root:gdscript/plugins/grid_placement_dev/docs