Skip to content

Class

GridPositioner2D

Generated GDScript class reference for GridPlacement.GridPositioner2D.

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.

On-grid cursor for placement. Recenters per [GridTargetingSettings] policy and follows mouse/keyboard input to update the tile-center position. Targeting and manipulation are separate: shape-cast acquisition is handled by dedicated components, and rotation/flip by ManipulationParent. This node only positions the cursor. resolve_placement_dependencies(container) is the injector integration point; set_dependencies(...) is the test/advanced helper.

Source: addons/grid_placement/systems/grid_targeting/grid_positioner/grid_positioner_2d.gd

Syntax

class GridPositioner2D extends Node2D

Members

NameKindSummary
sessionPropertyCanonical host pattern: when set, [method _ready] self-configures and registers with the nearest [GridPlacementHost]. Null uses the deprecated injector pattern.
LOG_PREFIXField
set_targeting_stateMethod
cursor_sourcePropertyOptional cursor-source callable returning a screen position; null or unset falls back to the real viewport mouse. Tests inject a fixed value: positioner.cursor_source = func(): return Vector2(100, 100)
input_processing_enabledPropertyPublic flag & API for enabling/disabling input processing (used by tests)
set_input_processing_enabledMethod
is_input_processing_enabledMethod
is_input_readyMethod
are_dependencies_readyMethod
move_to_viewport_center_tileMethod
move_to_cursor_center_tileMethod
remove_self_as_positionerMethod
update_visibilityMethod
should_be_visibleMethod
set_dependenciesMethod
get_runtime_issuesMethod
validate_dependenciesMethod
get_visual_nodeMethod
is_visual_visibleMethod
is_positioner_activeMethod
are_dependencies_resolvedMethod
to_diagnostic_stringMethod