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 Node2DMembers
| Name | Kind | Summary |
|---|---|---|
session | Property | The player session this cursor belongs to. When set, the cursor connects to the nearest GridPlacementHost when it enters the scene. |
placer_root | Property | Optional 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. |
previous | Property | |
LOG_PREFIX | Field | |
set_targeting_state | Method | |
cursor_source | Property | Optional 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_policy | Property | Policy 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_enabled | Property | Public flag & API for enabling/disabling input processing (used by tests) |
set_input_processing_enabled | Method | |
is_input_processing_enabled | Method | |
is_input_ready | Method | |
are_dependencies_ready | Method | |
get_cursor_screen_position | Method | |
move_to_viewport_center_tile | Method | |
move_to_cursor_center_tile | Method | |
remove_self_as_positioner | Method | |
update_visibility | Method | |
should_be_visible | Method | |
set_dependencies | Method | |
get_runtime_issues | Method | |
validate_dependencies | Method | |
get_visual_node | Method | |
is_visual_visible | Method | |
is_positioner_active | Method | |
are_dependencies_resolved | Method | |
to_diagnostic_string | Method |