Tracing & Target Selection
The player component runs a trace loop to determine which object is currently “focused”.
It can focus:
- Actor interactables (
UEDInteractableComponenton an actor) - Foliage / instanced meshes configured in
UEDInteractionSettings
Direct trace vs multi-trace
The system uses a two-stage approach:
- Direct line trace (fast): checks if the player is directly aiming at an interactable
- Sphere multi-trace (fallback): collects candidates and picks the best one using scoring
Scoring
Each candidate receives a score based on:
- Distance
- Look-at percentage (how centered the target is in the view)
- Trace method selection strategy (
EEDInteractionTraceMethod) - Optional tag-based priority weights (
interactableTagPriorityWeights)
The best-scored candidate becomes the focused target.
Trace method (EEDInteractionTraceMethod)
Each interactable can request a trace policy via:
FEDInteractionFocusInfo::TraceMethod
UseDefaultMethod resolves to the player component’s DefaultTraceMethod.
Configurable ranges
The main ranges are:
DirectInteractionTraceDistancedirectTraceLengthsphereTraceRangeFEDInteractionFocusInfo::MaxDistanceToCharacter
You can configure defaults globally through Project Settings or per-controller through component properties.
Filters
The player component can reject candidates based on:
- GameplayTag whitelist / blacklist / required query
- Actor tag whitelist / blocked tags
- Ignored actors list (runtime)
Output focus state
Focus state can be read from:
GetFocusedActor()GetIsFocusingFoliageInstance()GetFocusedInteractableTag()GetFocusedLocation()
And observed via the local delegate:
Local_OnFocusChanged