Skip to content
ct

Class

PlacementPositioning3DUtils

Generated GDScript class reference for GridPlacement.PlacementPositioning3DUtils.

Status
Draft
Version
v6.0
Updated
Development docs generated from GDScript source

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

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 ([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
move_node_by_tilesMethod
get_tile_world_centerMethod
get_used_boundsMethod
snap_tile_to_boundsMethod
direction_to_tile_deltaMethod