Interface IGridTargetResolver2D
- Namespace
- MoonBark.GridPlacement.Core.Services.Targeting
- Assembly
- MoonBark.GridPlacement.Core.dll
Core-friendly abstraction for resolving a grid coordinate from a world-space position. Implementations may be engine-backed (e.g. Godot sensors) or pure math fallbacks.
public interface IGridTargetResolver2D
Methods
TryGetTarget(CoreVector2, out CoreVector2I)
Attempts to resolve a target grid coordinate for the provided world-space position.
bool TryGetTarget(CoreVector2 worldPosition, out CoreVector2I gridPosition)
Parameters
worldPositionCoreVector2World-space position in Core coordinates.
gridPositionCoreVector2IResolved grid coordinate when successful.
Returns
- bool
True if the target is valid and resolved; otherwise false.