How-To: Choose a Scan Strategy
Goal: detect interactables the way your game's camera works - cursor (top-down) or forward aim (FPS/TPS). The strategy is simply which scan task your interact ability spawns; both tasks are this plugin's.
Pick a scan task
| Scan task | Use for | How it works |
|---|---|---|
UCrimsonAbilityTask_WaitForInteractableTargets_TopDownTrace | Diablo / PoE cursor games | Deprojects the mouse to the ground, sphere-searches around the hit, sorts by distance to cursor; fires hover enter/leave on the focused target; filters out targets farther than InteractionDistance from the avatar. |
UCrimsonAbilityTask_WaitForInteractableTargets_SingleLineTrace | FPS / over-shoulder TPS | Forward trace through the camera view, clipped to range; focused target = first hit along the aim. Interactables must overlap the trace channel. |
Wire it up
Swap the scan task call in your interact ability's activation (Quick Start step 6 uses the single-line version). The top-down factory takes a ground-trace profile and cursor radius instead of a start location:
Verify
Enable scan debug (settings
bShowDebugByDefault, or the debug flag on the task call) and watch the trace shape match your chosen strategy.Building your own scan task?
Subclass
UCrimsonAbilityTask_WaitForInteractableTargets, implement your trace, call UpdateInteractableOptions(Query, Targets), and bind InteractableObjectsChanged in your ability. The base stores CurrentOptions in priority order, so CurrentOptions[0] is the focused target. Append Interactable Targets From Hit Result (statics) does the interface collection for you.CrimsonCore (requires all Crimson plugins)
CrimsonCore's prebuilt interact ability wraps these same two tasks behind a
ScanStrategy enum dropdown - convenience only, same mechanics.