Live shape indicator for object multi-cell drags (LINE, RECTANGLE_FILL, RECTANGLE_OUTLINE). Terrain brushes already ghost the full pending shape while dragging (TerrainPreview); object drags previously showed only the single cursor ghost, so the area a release stamps was invisible. This node draws the pending shape from the session brush state's drag start to the live cursor cell: the exact generated cell path for LINE, a map-aligned polygon for rectangle shapes, and translucent fill only for RECTANGLE_FILL. On top of the span geometry, the overlay marks the ordered-simulation candidates: each shape cell, in commit order, whose footprint rect is anchored on mapped tile data and free of committed records plus already-accepted cells. Only these cells get placement markers, so a multi-cell drag shows the sparse subset it will actually stamp. Full rules still gate each commit, so commit results are always a subset of the preview — never more. Wiring: place one under World next to TerrainPreview. The host binder calls resolve_placement_runtime(host, session); the node then polls the session brush lifecycle every physics frame and hides itself whenever no object drag is active, so release, cancel, mode-exit, and session paths need no explicit teardown calls. 2D GRID TileMapLayer sessions only: without a target map (3D sessions) the node stays hidden.
Source: addons/grid_placement/systems/building/object_drag_shape_preview.gd
Syntax
class ObjectDragShapePreview extends PlacementNode2DMembers
| Name | Kind | Summary |
|---|---|---|
PREVIEW_GROUP | Field | Scene-tree group so the host or tools can refresh all shape previews. |
FALLBACK_OUTLINE | Field | Fallback outline color when no highlight settings resolve. |
FILL_ALPHA | Field | Fill alpha applied over the resolved outline color. |
SIM_REFRESH_INTERVAL_TICKS | Field | |
resolve_placement_dependencies | Method | |
resolve_placement_runtime | Method | |
request_refresh | Method | |
update_preview | Method | |
get_last_geometry | Method | |
is_shape_visible | Method | |
empty | Property | |
service | Property | |
entry | Property | |
cap | Property | |
coordinator | Property | |
placement_budget | Property | |
preview_settings | Property | |
tile_size | Property | |
placement_cap | Property | |
rotation | Property | |
preview | Property | |
placed_count | Property | |
states | Property | |
tick | Property | |
key | Property | |
cells | Property | |
result | Property | |
geometry_for_cells | Method | |
none | Property | |
line_cells | Property | |
line_points | Property | |
min_cell | Property | |
max_cell | Property | |
basis_x | Property | |
basis_y | Property | |
half_x | Property | |
half_y | Property | |
top_left | Property | |
top_right | Property | |
bottom_right | Property | |
bottom_left | Property | |
outline | Property | |
bounds | Property |