Skip to content

Class

GridPositioner3D

Generated GDScript class reference for GridPlacement.GridPositioner3D.

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 3D placement cursor. Finds the GridMap cell under the mouse. Casts a ray from the camera through the mouse position and reports the cell it lands on, preferring objects that block cursor_collision_mask over the ground behind them. Assign session and it connects to the nearest GridPlacementHost on its own.

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

Syntax

class GridPositioner3D extends RefCounted

Members

NameKindSummary
has_hitPropertyWhere the cursor ray last landed: the point, surface normal, grid cell, and the object hit. has_hit is false when nothing was hit.
positionProperty
normalProperty
cellProperty
colliderProperty
cell_changedSignalEmitted when the cursor moves to a different cell. Passes MISS when the cursor leaves the grid, such as pointing at the sky.
cell_clickedSignalEmitted when a mouse button is pressed over a cell.
cursor_movedSignalEmitted on every mouse move over the grid, even within the same cell. Use it for things that depend on where in the cell the cursor is, such as which edge or face a piece mounts on.
LOG_PREFIXField
MISSFieldSentinel returned by ray_from_screen_to_cell() on a grid miss; same contract as [GridCellRaycaster3D.MISS].
cameraPropertyCamera to cast from. When empty, the viewport's active camera is used.
gridPropertyGridMap to target. When empty, the level's target grid is used.
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 (the player). In 3D the camera is not automatically the player's inventory owner, so this stays a separate reference. The session is the authority; leave empty for actor-free placement. Assigning it at runtime rebinds the session.
Property
cursor_collision_maskPropertyPhysics layers that stop the cursor ray, so pointing at a wall targets the wall instead of the floor behind it. Openings without collision, such as doorways, let the ray through. Set to none to always target the ground.
cell_stick_fractionPropertyCell-boundary hysteresis for mouse picking, as a fraction of the smaller horizontal cell size. Vertical motion in a 45-degree isometric view maps to the cell diagonal; without a dead band the pick flips between the two cells straddling that diagonal. Set to 0 to disable.
cursor_sourcePropertyInjected cursor-source callable returning a Vector2 screen position; tests inject a fixed value for deterministic positioning.
ui_policyPropertyPolicy 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_enabledPropertyEnables/disables input processing; mirrors the 2D positioner's input_processing_enabled.
get_current_cellMethod
get_terrain_target_cell_3dMethod
get_pick_observabilityMethod
restore_cellMethod
set_input_processing_enabledMethod
refresh_cell_from_mouseMethod
is_input_readyMethod
are_dependencies_readyMethod
set_dependenciesMethod
set_targeting_stateMethod
move_to_viewport_center_tileMethod
move_to_cursor_center_tileMethod
ray_from_screen_to_cellMethod
ray_from_screen_to_cell_occludedMethod
get_last_pick_hitMethod
is_placement_relevant_colliderMethod
get_raycasterMethod
get_runtime_issuesMethod
validate_dependenciesMethod
remove_self_as_positionerMethod
get_cursor_screen_positionMethod