Skip to content

Class

GridPositioner2D

Generated GDScript class reference for GridPlacement.GridPositioner2D.

Status
Current
Version
v6.3.0
Source updated
2026-10-29
Generated on
2026-10-29

6.3. These pages document the 6.3 release, where placeable is now entry (what changed) and PlacementOwner is deprecated (migration). Still on 6.2? Your version's guides ship inside the plugin itself, under addons/grid_placement/guides/; the 6.2 URLs on this site now redirect to this series.

The 2D placement cursor. Snaps to the center of the tile under the mouse or moves tile by tile with the keyboard. How it moves is set in GridTargetingSettings. It only moves the cursor; rotating and flipping are handled by ManipulationParent.

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

Syntax

class GridPositioner2D extends Node2D

Members

NameKindSummary
sessionPropertyThe player session this cursor belongs to. When set, the cursor connects to the nearest GridPlacementHost when it enters the scene.
placer_rootPropertyOptional actor this cursor places for (player, NPC, AI agent). The session is the authority; this is the scene-authored shortcut for it. Leave empty for actor-free placement. Assigning it at runtime rebinds the session.
Property
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)
ui_policyPropertyPolicy answering pointer-over-UI. 2D does not gate on it (the GUI already consumes a press before the host's unhandled input); it only names that press in the failure evidence. Headless tests inject a stub.
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
get_cursor_screen_positionMethod
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