Chris' Tutorials
Docs/Grid Placement

Class

ObjectPlacementService3D

Generated GDScript class reference for GridPlacement.ObjectPlacementService3D.

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.

Scene-free 3D object placement service ( v1, ground snapping). Owns the preview ghost, validity evaluation, and placement commit for 3D sessions. Production addon code (not demo code) because valid/invalid preview feedback is core placement UX every 3D consumer needs; demos and games only wire it to their positioner/UI. Validity rules (evaluated in order, all must pass): 1. an active [ScenePlacementEntry] with a packed_scene is selected 2. no footprint cell is already occupied by a placed object 3. every footprint column has resolvable ground on the GridMap (when [member ObjectPlacementSettings3D.require_ground_cell]) 4. the surface elevation delta across the footprint stays within [member ObjectPlacementSettings3D.max_elevation_delta] ("too steep") 5. the entry's [PlacementSnapProfile3D] adjacency requirement is met (when [member PlacementSnapProfile3D.require_adjacent_snap]) Ground resolution: each footprint column is scanned top-down through the GridMap ([member ObjectPlacementSettings3D.surface_scan_max_y] .. [member ObjectPlacementSettings3D.surface_scan_min_y]); the first occupied cell's mesh AABB top is the walkable surface, so slabs, full blocks, and stacked blocks all resolve without per-item configuration. Objects rest on the HIGHEST surface under their footprint. Cell items are assumed unrotated (v1); socket-level snapping is . Visual feedback decision (see the draft guide): the ghost's meshes are TINTED via material_override (valid/invalid colors from settings) instead of spawning 2D-style indicator cubes. In 3D, per-cell indicator geometry occludes the scene and duplicates draw work; the tinted ghost communicates validity, final position, and footprint in a single visual.

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

Syntax

class ObjectPlacementService3D extends RefCounted

Members

NameKindSummary
object_placedEventEmitted after a successful [method try_place_at] commit.
preview_validity_changedEventEmitted when the preview ghost flips between valid and invalid.
MISSFieldSentinel matching [constant GridPositioner3D.MISS].
NO_GROUNDFieldReturned by [method resolve_surface_height] when a column has no ground.
configureMethod
is_configuredMethod
set_active_entryMethod
get_active_entryMethod
update_preview_cellMethod
issuesProperty
validProperty
is_preview_validMethod
get_preview_cellMethod
clear_previewMethod
footprint_cellsMethod
sizeProperty
cellsProperty
resolve_surface_heightMethod
libraryProperty
probeProperty
itemProperty
meshProperty
top_offsetProperty
center_globalProperty
resolve_surface_item_nameMethod
libraryProperty
probeProperty
itemProperty
validate_cellMethod
issuesProperty
cellsProperty
min_surfaceProperty
max_surfaceProperty
missing_groundProperty
surfaceProperty
profileProperty
placement_positionMethod
cellsProperty
sumProperty
max_surfaceProperty
centerProperty
try_place_reportMethod
reportProperty
issuesProperty
nodeProperty
populate_surface_metadataMethod
cellsProperty
max_surfaceProperty
surface_nameProperty
surfaceProperty
try_place_atMethod
issuesProperty
nodeProperty
profileProperty
familyProperty
is_cell_occupiedMethod
get_placed_nodeMethod
get_family_atMethod
get_placed_countMethod
nearest_edgeMethod
centerProperty
dxProperty
dzProperty
edge_positionMethod
keyProperty
centerProperty
halfProperty
surfaceProperty
edge_yawMethod
is_edge_occupiedMethod
validate_edgeMethod
issuesProperty
profileProperty
update_preview_edgeMethod
issuesProperty
validProperty
try_place_at_edgeMethod
issuesProperty
nodeProperty
disposeMethod

Source

addons/grid_placement/systems/building/3d/object_placement_service_3d.gd

Plugin docs root:gdscript/plugins/grid_placement_dev/docs