Skip to content

Class

ObjectPlacementGeometry3D

Generated GDScript class reference for GridPlacement.ObjectPlacementGeometry3D.

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.

Stateless 3D placement geometry and registry-key helpers for [ObjectPlacementService3D]. Every method is static; callers pass the GridMap, a pre-resolved surface height, and cell size, so no placement state is held.

Source: addons/grid_placement/systems/building/3d/object_placement_geometry_3d.gd

Syntax

class ObjectPlacementGeometry3D extends RefCounted

Members

NameKindSummary
transformPropertyA transform some lookup found. Lookups return null instead on a miss, so an identity transform never doubles as "not found".
NO_GROUNDFieldSentinel for a column with no ground item.
EDGE_STICK_FRACTIONFieldDefault edge-stick margin for [method nearest_edge_sticky], as a fraction of the smaller horizontal cell extent. A rival edge must beat the current one by this distance before the ghost switches, so cursor tremor near a diagonal or the cell center cannot strobe the wall preview.
TOP_RIDGE_FRACTIONFieldTOP ridge capture radius for [method nearest_top_socket], as a fraction of the cell X extent. A cursor pick inside this ring reads the cell-centered ridge socket ([constant Vector3i.ZERO]); outside it reads the nearest slope edge. The sticky variant holds each socket past this ring by the stick margin, so roof ghosts commit to a socket instead of strobing.
seam_shift_3dMethod
shiftProperty
yawProperty
basisProperty
sizeProperty
used_axesProperty
dirProperty
grid_axisProperty
mesh_dirProperty
face_distProperty
cells_alongProperty
cell_lenProperty
stepProperty
column_keyMethod
resolve_surface_heightMethod
resolve_surface_rowMethod
resolve_surface_item_nameMethod
placement_positionMethod
footprint_cellsMethod
cell_world_aabbMethod
single_cell_world_aabbMethod
nearest_edgeMethod
nearest_edge_stickyMethod
LATERAL_NORMAL_Y_MAXFieldA hit normal counts as lateral (aimed at a side face, not the top or ground) while its map-local Y stays under this. Shared by the facing-first socket picks so edges and faces agree on what "facing" means; the 0.7 cosine is ~45 degrees off vertical.
nearest_edge_for_hitMethod
lateral_face_for_hitMethod
nearest_top_socketMethod
nearest_top_socket_stickyMethod
freshProperty
marginProperty
centerProperty
rProperty
ringProperty
face_normal_from_rayMethod
edge_positionMethod
edge_yawMethod
center_localProperty
midpointProperty
stepsProperty
cornersProperty
loProperty
hiProperty
rotatedProperty
edge_outward_yawMethod
top_yawMethod
top_positionMethod
factorProperty
keyProperty
world_positionProperty
positionProperty
is_cell_cornerMethod
CARDINAL_CORNERSFieldThe four XZ cell-corner offsets, in stable order.
nearest_cornerMethod
corner_positionMethod
corner_yawMethod
corner_keyMethod
face_positionMethod
face_yawMethod
FACE_SOCKET_NODE_NAMEFieldNode name of the optional declared FACE mount socket: a Node3D child whose origin sits on the wall's visible face plane with -Z outward. When present, the service mates consumers to it instead of the cell-derived fallback.
FACE_SOCKET_SYMMETRIC_METAFieldMeta key stamped when the provider opts into rotational symmetry ([member PlacementSnapProfile3D.face_socket_symmetric]). True permits yaw derivation onto faces without an authored socket; absent is fail-closed.
declared_face_socketMethod
consumer_anchor_localMethod
derived_face_mount_transform_for_anchor_localMethod
socketProperty
axisProperty
centerProperty
halfProperty
oppositeProperty
nearest_outsideProperty
nearest_outside_sProperty
socket_worldProperty
sProperty
outwardProperty
candidate_dirProperty
yaw_candidateProperty
dProperty