Troubleshooting
Common issues and solutions for the Agentic Targeting System
Troubleshooting
Common issues and solutions for the Agentic Targeting System.
Compilation Issues
"TargetingSystem module not found"
Solution: Enable Epic's Gameplay Targeting System plugin.
- Edit → Plugins → Search "Targeting System"
- Enable it
- Restart Editor
- Regenerate project files
"Cannot find AgenticTargetingComponent.h"
Solution: Add module dependency to your Build.cs:
PrivateDependencyModuleNames.Add("AgenticTargeting");No Targets Found
Targets exist but Lock() does nothing
Check:
-
Preset is set:
TargetingComponent->SetPresetByTag(FGameplayTag::RequestGameplayTag("Agentic.Targeting.Preset.Melee")); -
Style is set:
TargetingComponent->SetStyleByTag(FGameplayTag::RequestGameplayTag("Agentic.Targeting.Style.Souls")); -
Targets are in range: Default melee preset is 15m. Try Ranged (30m) for testing.
-
Targets have collision: Ensure enemies have collision that responds to
ECC_Pawn. -
Enable debug:
TargetingComponent->bDebugDraw = true; TargetingComponent->bDebugLog = true;
Debug shows targets but lock fails
Check:
- IAgenticTargetable::CanBeTargeted - If implemented, ensure it returns
true - Filter tasks - Check preset isn't filtering out all targets
- Line of sight - Ensure nothing blocking between player and target
Trace Channel Misconfigured
Symptoms: Targets found by AOE but filtered out by LOS check.
Solution: The default LOS filter uses ECC_Visibility. If your collision setup blocks this channel, targets will fail LOS even when visible.
- Check your enemy's collision response to
Visibilitychannel - Or change the trace channel in the preset's
FilterLOStask:"TraceChannel": "ECC_Camera" - Or create a custom trace channel for targeting
Lock Breaks Too Easily
Target releases during combat
Solutions:
-
Increase grace period in style:
"GracePeriod": 1.0 -
Use GoW style - Has longer grace period (0.7s vs 0.5s)
-
Check validation distance - Ensure validation preset allows larger distance than lock preset
-
Reduce validation frequency:
"ValidationTickInterval": 2.0
Lock Won't Release
Toggle doesn't release lock
Check style's RelockAction:
TryDifferent- Tries to find another target before releasingCycle- Cycles to next targetRelease- Immediately releases
If you want toggle to always release:
"RelockAction": "Release"Events Not Firing
OnTargetAcquired not called
Check binding:
// Must use AddDynamic, not AddUObject
TargetingComponent->OnTargetAcquired.AddDynamic(this, &AMyCharacter::OnTargetAcquired);
// Function must be UFUNCTION
UFUNCTION()
void OnTargetAcquired(AActor* Target);Blueprint events not working
Ensure you're binding in Event Graph, not Construction Script. The component must exist at runtime.
Soft Lock Issues
Freeflow style not auto-targeting
Call TriggerSoftLockUpdate:
// Must call this when attack starts
void AMyCharacter::OnAttackStart()
{
TargetingComponent->TriggerSoftLockUpdate();
}Soft lock picks wrong target
Check preset sort order:
StickDirection- Should be first sort for freeflow- Ensure player has valid input direction
Performance Issues
Targeting causing frame drops
Solutions:
- Reduce AOE radius in preset
- Increase validation interval:
"ValidationTickInterval": 1.0 - Reduce awareness update frequency
- Filter by ActorClass to reduce initial pool
DataTable Issues
Styles/Presets not loading
Check:
- DataTables are imported from JSON correctly
- Tags exist in
DT_TargetingTags.csv - DataTable paths are set in Project Settings → Game → Agentic Targeting
JSON import fails
Common issues:
- Missing commas between objects
- Trailing commas (not allowed)
- Mismatched braces
- Tag names must match exactly
Validate JSON: Use jsonlint.com or VS Code JSON extension.
Blueprint Issues
Can't find Targeting Component in Add Component
Solution: The component is named "Agentic Targeting Component" - search for "Agentic" or "Targeting".
Set Style By Tag node shows no options
Solution: Use Make Gameplay Tag node and type the tag string manually:
Agentic.Targeting.Style.SoulsDebug Visualization
Enable debug to visualize targeting:
TargetingComponent->bDebugDraw = true;Colors:
- Green sphere - Current soft lock target
- Red sphere - Hard locked target
- Yellow spheres - Other valid targets in pool
- Blue line - Line of sight check
Getting Help
- GitHub Issues: Report bugs
- Discord: Join community