Targeting chain
This page is the canonical reference for the Targeting chain in GridPlacement 6.0.
The targeting chain is the coordinated sequence of systems that transforms raw pointer intent (mouse/touch/keyboard-driven cursor movement) into a stable target snapshot (snapped grid coordinate + resolved target node) that downstream chains can consume.
Boundary
- Godot layer
- Captures
InputEventand decides routing/priority. - Owns viewport/world coordinate sampling.
- Captures
- Core boundary (workflow readiness / ports)
- Exposes narrow, engine-agnostic readiness/contracts (no Godot types).
- Downstream chains (Placement/Manipulation) consume targeting through workflow ports.
6.0 targeting chain
| |
What is “the target”
A target snapshot is treated as:
- Grid coordinate
- Snapped
Vector2i(or Core equivalent) representing the current cell.
- Snapped
- Resolved target node
- A
Node2Drepresenting the logical target for manipulation/info. - May differ from the raw physics collider.
- A
Target resolution (logical target vs collision object)
Targeting is allowed to detect collision shapes on child nodes while targeting a parent/root logical node.
Resolution priority:
- Direct metadata (e.g. a “root_node” meta pointing at the logical target)
- Manipulatable discovery (sibling/child lookup for a manipulatable component)
- Fallback: treat the collision node as the logical target
Output contract
What the targeting chain guarantees:
- The latest target snapshot is stable (snapped) and updated when needed.
- Downstream chains can treat targeting output as authoritative.
What it does NOT guarantee:
- It does not apply indicators.
- It does not validate placement rules.
- It does not mutate grid occupancy.