Skip to content

Class

GridTargetingState

Generated GDScript class reference for GridPlacement.GridTargetingState.

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

State for targeting objects within the Grid Building System.

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

Syntax

class GridTargetingState extends PlacementResource

Members

NameKindSummary
target_changedSignalTypically target is set by a TargetingShapeCast2D or similar casting node at runtime.
target_changed_3dSignal3D mirror of [signal target_changed]: the host sets [member target_3d] from positioner-cell resolution since 3D placeables carry no physics.
positioner_changedSignalEmitted when the positioner node changes.
target_map_changedSignalEmitted when the main target TileMapLayer changes.
maps_changedSignalEmitted when the known-maps list changes (maps usable without collision checks).
is_readyMethod
targetPropertyTargeted node.
oldProperty
should_clearProperty
target_3dProperty3D mirror of [member target]. See [method set_manual_target_3d].
oldProperty
should_clearProperty
positionerPropertyParent node that positions grid building objects in the world.
target_mapPropertyMain map used for grid distances, usually where characters stand.
fallbackProperty
target_map_3dProperty3D mirror of [member target_map], typed [GridMap] so the 3D service needs no casts; 2D users never touch it.
positioner_3dProperty3D mirror of [member positioner], kept separate so 2D positioners (cast to Node2D) keep their type.
world_facts_provider_2dPropertyOptional world/physics facts provider so preview, validation, and reports share one truth source without depending on a physics backend.
mapsPropertyAll maps known to the targeting state. Optional for single-layer levels: empty falls back to [member target_map]. List every gameplay-relevant layer once the level uses more than one; cosmetic maps can be excluded.
tile_sizePropertyTile size property that delegates to the target map's tile set
collision_exclusionsPropertyNodes excluded from indicator collision validation, primarily the original object during a manipulation move. Auto-cleared when the target changes; set at the start of the move and left to auto-clear when it ends.
is_manual_targeting_activePropertyManual targeting mode: automatic targeting systems will not overwrite the target and collision exclusions persist across updates. Used during BUILD (preview) and MOVE (manipulation copy); set via set_manual_target(), cleared via clear_manual_target().
smooth_world_positionPropertyExact world position for SMOOTH placement mode, updated by the positioner or an external caller; grid mode ignores it.
has_live_smooth_positionPropertyTrue once the positioner wrote a real pointer position, distinguishing "no data yet" from a legitimate origin placement so the host does not flash a preview at (0,0).
smooth_world_position_3dProperty3D exact world position for SMOOTH placement mode; grid mode ignores it.
has_live_smooth_position_3dPropertyTrue once the 3D positioner has written a real pointer position.
pick_ray_origin_3dPropertyWorld-space pointer ray of the latest 3D hover, mirrored from the spike by the positioner. Hover identity resolves the record this ray hit.
pick_ray_dir_3dProperty
has_live_pick_ray_3dPropertyTrue once the 3D positioner wrote a real pointer ray. Keyboard nav and session rebinds clear it, so click-time acquisition never answers from a ray that predates the positioner cell.
last_click_missed_3dPropertyTrue when the latest 3D click raycast missed the grid (sky/void click). Set by the positioner's click branch alongside the ray publish; consumed (read + cleared) by click-time acquisition so a sky click finds no target instead of acting on the stale hover cell. Defaults false so headless/tests without clicks keep the legacy behavior.
clear_collision_exclusionsMethod
set_manual_targetMethod
set_manual_target_3dMethod
clear_manual_targetMethod
set_map_objectsMethod
get_target_map_tile_shapeMethod
get_target_map_tile_setMethod
get_tile_sizeMethod
set_tile_sizeMethod
validate_runtimeMethod
get_ownerMethod
get_owner_rootMethod
get_originMethod
get_editor_issuesMethod
get_runtime_issuesMethod