Chris' Tutorials
Docs/Grid Placement

Class

GridPositioner3DSpike

Generated GDScript class reference for GridPlacement.GridPositioner3DSpike.

StatusDraft
Versionv6.0
UpdatedDevelopment docs generated from GDScript source

This is unreleased documentation in active development. APIs, class names, and behavior may change before the final release.

Draft — Unreleased:This page is in active development. APIs, class names, and behavior may change before the release is finalized. Use it as a preview of what's coming — not as a stable integration target.

6.0.0-3D-Surface (Wave A.2 spike): GridPositioner3D camera ray-cast helper. This is a spike, not a production positioner. It validates the highest-risk piece of the 3D surface (Camera3D ray → GridMap cell) end-to-end before committing to the full Wave B/C/D plan. What it does: given a Camera3D, a GridMap, and a screen-space cursor position, returns the GridMap cell the camera is looking at (or null if the ray misses the grid). What it does NOT do: full 2D-style positioner lifecycle, mode gating, multi-camera, recenter, keyboard nav, rotation, etc. Those are Wave B/C/D work; the spike is the math, not the surface. Math: Camera3D.project_ray_origin(screen_pos) + project_ray_normal(screen_pos) gives the world-space ray. We intersect it with the y=0 (or the configured ground plane) and use GridMap.local_to_map(world_hit) to resolve the cell. GridMap is a static body in Godot 4.6; we can also use PhysicsServer3D.space_get_direct_state().intersect_ray() for a more accurate hit (catches diagonal/blocked grids). 6.0.0 host + session pattern: this spike does NOT extend PlacementNode2D / PlacementNode3D. It is a stand-alone Node3D helper; the eventual GridPositioner3D (Wave B) will wire it into the host's _input dispatch via the same pattern as GridPositioner2D (which is also a stand-alone Node2D, not a PlacementNode2D).

Source: addons/grid_placement/systems/grid_targeting/grid_positioner/3d/grid_positioner_3d_spike.gd

Syntax

class GridPositioner3DSpike extends Node3D

Members

NameKindSummary
cameraPropertyThe camera that the spike ray-casts through. Set this at _ready() in your test/scene; the spike does not auto-discover.
gridPropertyThe grid the spike resolves cells on. Same pattern as `camera`.
ground_plane_yPropertyThe y-coordinate (in grid-local space) of the ground plane the ray intersects. Default 0.0 = top face of the cell layer at y=0.
SPIKE_MISSFieldSentinel returned when the ray misses the grid. The test asserts on `== SPIKE_MISS` rather than `== null` to make the contract explicit and to avoid Godot's null-Variant ambiguity.
ray_from_screen_to_cellMethod
ray_originProperty
ray_normalProperty
world_to_gridProperty
grid_originProperty
grid_normalProperty
tProperty
hit_point_localProperty
cellProperty
ray_from_screen_to_cell_or_nullMethod
cellProperty

Source

addons/grid_placement/systems/grid_targeting/grid_positioner/3d/grid_positioner_3d_spike.gd

Plugin docs root:gdscript/plugins/grid_placement_dev/docs