Chris' Tutorials
Docs/Grid Placement

Class

PlacementPositioning3DUtils

Generated GDScript class reference for GridPlacement.PlacementPositioning3DUtils.

StatusDraft
Versionv6.0
UpdatedDevelopment docs generated from GDScript source

This is unreleased documentation in active development. APIs, class names, and behavior may change before the final release.

Draft — Unreleased:This page is in active development. APIs, class names, and behavior may change before the release is finalized. Use it as a preview of what's coming — not as a stable integration target.

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 RefCounted

Members

NameKindSummary
get_tile_from_global_positionMethod
map_positionProperty
move_to_tile_centerMethod
tile_center_localProperty
tile_center_globalProperty
get_tile_from_node_positionMethod
localProperty
move_node_by_tilesMethod
current_tileProperty
new_tileProperty
get_tile_world_centerMethod
get_used_boundsMethod
cellsProperty
cell_sizeProperty
min_posProperty
max_posProperty
localProperty
snap_tile_to_boundsMethod
cellsProperty
min_tileProperty
max_tileProperty
direction_to_tile_deltaMethod
nProperty
sxProperty
syProperty
szProperty

Source

addons/grid_placement/utils/placement_positioning_3d_utils.gd

Plugin docs root:gdscript/plugins/grid_placement_dev/docs