Controls the on-grid cursor used by building/interaction systems in 3D. 6.0.0-3D-Surface (Wave B1.3): production 3D positioner. Drives a [GridPlacementHost] via [_input] / [_physics_process] dispatch, resolves the camera cursor to a GridMap cell via [Camera3D] ray-cast + [GridMap.local_to_map] (through [GridPositioner3DSpike]). It self-configures from its exported session ([set_dependencies], [set_targeting_state]); the host's consumer binder skips positioners. Difference from the 2D positioner: 2D uses [Camera2D] + canvas-transform projection; 3D uses [Camera3D] + ray-cast to a ground plane. The 2D visibility/recenter/diagnostic pipeline is intentionally not mirrored; consumers use the host's mode + visibility logic instead. No extends PlacementNode2D/3D: this is a stand-alone Node3D, matching the 2D positioner, which does not extend the per-node DI base either.
Source: addons/grid_placement/systems/grid_targeting/grid_positioner_3d.gd
Syntax
class GridPositioner3D extends Node3DMembers
| Name | Kind | Summary |
|---|---|---|
cell_changed | Signal | Emitted when mouse targeting resolves a different GridMap cell, or [constant MISS] when the ray leaves the grid (sky/void). Consumers clear hover feedback on MISS; the dedupe guard suppresses repeat emits. |
cell_clicked | Signal | Emitted when a mouse button is pressed while targeting a valid cell. Consumers decide what a click means; the positioner stays placement-agnostic. |
LOG_PREFIX | Field | |
MISS | Field | Sentinel returned by [method ray_from_screen_to_cell] on a grid miss; same contract as [GridPositioner3DSpike.SPIKE_MISS]. |
camera | Property | Active camera, set via [method configure] or auto-resolved from [code]viewport.get_camera_3d()[/code]. |
grid | Property | Active target grid, set via [method configure] or resolved from the targeting state. |
session | Property | Session this positioner serves. When set, [method _ready] self-configures and registers with the nearest [GridPlacementHost]. |
cursor_source | Property | Injected cursor-source callable returning a [Vector2] screen position; tests inject a fixed value for deterministic positioning. |
ui_policy | Property | Policy answering pointer-over-UI for press gating. Games whose UI never drives viewport hover, and headless tests (hover needs a display), replace this with a custom [PositionerUIPolicy]. |
input_processing_enabled | Property | Enables/disables input processing; mirrors the 2D positioner's [code]input_processing_enabled[/code]. |
get_current_cell | Method | |
set_input_processing_enabled | Method | |
is_input_ready | Method | |
are_dependencies_ready | Method | |
set_dependencies | Method | |
set_targeting_state | Method | |
move_to_viewport_center_tile | Method | |
move_to_cursor_center_tile | Method | |
ray_from_screen_to_cell_or_null | Method | |
ray_from_screen_to_cell | Method | |
ray_from_screen_to_cell_occluded | Method | |
get_spike | Method | |
move_positioner_by_tile | Method | |
get_runtime_issues | Method | |
validate_dependencies | Method | |
remove_self_as_positioner | Method |