INSODIMENSIONStudios

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.

  1. Edit → Plugins → Search "Targeting System"
  2. Enable it
  3. Restart Editor
  4. 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:

  1. Preset is set:

    TargetingComponent->SetPresetByTag(FGameplayTag::RequestGameplayTag("Agentic.Targeting.Preset.Melee"));
  2. Style is set:

    TargetingComponent->SetStyleByTag(FGameplayTag::RequestGameplayTag("Agentic.Targeting.Style.Souls"));
  3. Targets are in range: Default melee preset is 15m. Try Ranged (30m) for testing.

  4. Targets have collision: Ensure enemies have collision that responds to ECC_Pawn.

  5. Enable debug:

    TargetingComponent->bDebugDraw = true;
    TargetingComponent->bDebugLog = true;

Debug shows targets but lock fails

Check:

  1. IAgenticTargetable::CanBeTargeted - If implemented, ensure it returns true
  2. Filter tasks - Check preset isn't filtering out all targets
  3. 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.

  1. Check your enemy's collision response to Visibility channel
  2. Or change the trace channel in the preset's FilterLOS task:
    "TraceChannel": "ECC_Camera"
  3. Or create a custom trace channel for targeting

Lock Breaks Too Easily

Target releases during combat

Solutions:

  1. Increase grace period in style:

    "GracePeriod": 1.0
  2. Use GoW style - Has longer grace period (0.7s vs 0.5s)

  3. Check validation distance - Ensure validation preset allows larger distance than lock preset

  4. 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 releasing
  • Cycle - Cycles to next target
  • Release - 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:

  1. Reduce AOE radius in preset
  2. Increase validation interval:
    "ValidationTickInterval": 1.0
  3. Reduce awareness update frequency
  4. Filter by ActorClass to reduce initial pool

DataTable Issues

Styles/Presets not loading

Check:

  1. DataTables are imported from JSON correctly
  2. Tags exist in DT_TargetingTags.csv
  3. 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.Souls

Debug 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