Skip to content

Class

TargetHighlight3D

Generated GDScript class reference for GridPlacement.TargetHighlight3D.

Status
Current
Version
v6.1.0
Source updated
2026-09-24
Generated on
2026-09-23

3D hover highlight: tints the hovered placed object's own meshes. Follows [member GridTargetingState.target_3d] (the host resolves the hovered cell column to a placed root) and tints the meshes by mode, so info/move/demolish/build hovering always shows an effect on the thing itself. During a move carry the subject switches to the carried ghost and the color switches to the live drop validity (green/red). The tint rides [member GeometryInstance3D.material_overlay], which never touches authored materials; prior overlays are restored on unhover. Alpha-cutout surfaces (foliage) instead take a per-surface emission clone that preserves the authored texture, scissor cutoff, and cull mode, so only visible texels tint rather than whole quads. [enum DisplayMode].BOX keeps the legacy wire box (the shared pick volume) as a configurable option. Hidden with no target or in OFF.

Source: addons/grid_placement/systems/grid_targeting/target_highlight_3d.gd

Syntax

class TargetHighlight3D extends PlacementNode3D

Members

NameKindSummary
HIGHLIGHT_GROUPFieldScene-tree group the highlight registers, so the demolish-box tick can push victim roots without a scene-path coupling (same precedent as the object shape preview group).
COLOR_INFOFieldHow the hovered target renders. MESH tints the target's own meshes (the default players expect); BOX draws the pick-volume wire box.
COLOR_BUILDField
COLOR_MOVEField
COLOR_DEMOLISHField
COLOR_MOVE_VALIDFieldFallback carry colors when no HighlightSettings are configured; mirror the move_valid_color/move_invalid_color defaults.
COLOR_MOVE_INVALIDField
OVERLAY_ALPHAFieldOverlay tint strength in MESH mode. Opaque enough to read on any texture, transparent enough to keep mesh detail visible.
EMISSION_ENERGYFieldEmission strength of cutout surface tints. The clone keeps the authored albedo, so the mode color reads as a glow over the intact texture.
display_modePropertyRender mode. MESH (default) tints the target's meshes; BOX draws the legacy wire box. Set from the inspector per demo or at runtime.
highlight_settingsPropertyConfigured carry colors (same resource the 2D highlighter uses); falls back to COLOR_MOVE_VALID/COLOR_MOVE_INVALID when unconfigured.
resolve_placement_dependenciesMethod
current_boxMethod
set_box_rootsMethod