INSODIMENSIONStudios

Quick Start Guide

Get Agentic Targeting working in your UE5 project in 5 minutes

Agentic Targeting - Quick Start Guide

A step-by-step guide to integrating the Agentic Targeting system into your Unreal Engine project.

Requirements: Unreal Engine 5.5+ (wraps Epic's Gameplay Targeting System plugin)


Step 1: Install the Plugin

Copy the AgenticTargeting folder to your project's Plugins/ directory:

YourProject/
  Plugins/
    AgenticTargeting/    <-- Copy here

Step 2: Enable Required Plugins

  1. Open your project in Unreal Editor
  2. Go to Edit → Plugins

2a. Enable Gameplay Abilities (GAS)

Search for "Gameplay Abilities" and enable it:

Gameplay Abilities plugin

2b. Enable Agentic Targeting

Search for "Agentic Targeting" and enable it:

Agentic Targeting plugin

  1. Restart the editor when prompted

Epic's "Gameplay Targeting System" plugin is also required - it's auto-enabled as a dependency of Agentic Targeting.


Step 3: Configure GameplayTags

The targeting system uses GameplayTags for styles and presets. You need to register the plugin's tag table.

  1. Go to Edit → Project Settings

Project Settings menu

  1. Navigate to Project → GameplayTags
  2. Under Gameplay Tag Table List, click the + button
  3. Select /AgenticTargeting/Data/Targeting/DT_TargetingTags

GameplayTags configuration

This registers all targeting-related tags (styles, presets, etc.) with your project.

3b. Configure Data Tables

Still in Project Settings, navigate to Game → Agentic Targeting and configure the data tables:

SettingValue
Default Targeting Preset Data TableDT_TargetingPresets
Default Targeting Style Data TableDT_TargetingStyles
Task Primitives Data TablesAdd DT_TargetingTasks

Data Tables configuration

These data tables define the available presets, styles, and targeting tasks that the plugin uses.


Step 4: Add Module Dependency (C++ Only)

Skip this step if you're using Blueprint-only.

If your game module uses C++ and needs to reference targeting classes directly, add the dependency to your Build.cs:

PublicDependencyModuleNames.AddRange(new string[]
{
    "Core",
    "CoreUObject",
    "Engine",
    "InputCore",
    "AgenticTargeting"  // Add this line
});

Step 5: Add Targeting Component to PlayerController

CRITICAL: Add to PlayerController, NOT Character!

The targeting component MUST be added to your PlayerController, not your Character/Pawn.

Why?

  • Persists across character respawns and deaths
  • Works correctly with possession (switching pawns)
  • Maintains lock-on state during gameplay transitions

Adding it to the Character is a common mistake that will cause targeting to fail.

  1. Open your PlayerController Blueprint (e.g., BP_PlayerController)
  2. In the Components panel, click Add
  3. Search for "Agentic Targeting"
  4. Add the AgenticTargetingComponent

Component added to controller

Configure the Component

Select the component and configure these properties in the Details panel:

PropertyDescriptionRecommended
Default Preset TagHow to search for targetsAgentic.Targeting.Preset.Melee
Default Style TagLock-on behaviorAgentic.Targeting.Style.Souls
Max TargetsMax targets to track10
Debug DrawShow debug visualizationtrue (for testing)

Component configuration

The Default Preset Tag is the most important - it defines search radius, angle, and sorting rules.


Step 6: Implement IAgenticTargetable on Enemies

For an actor to be targetable, it must implement the IAgenticTargetable interface.

6a. Add Interface (Blueprint)

  1. Open your Enemy Blueprint (e.g., BP_CombatEnemy)
  2. Click Class Settings in the toolbar
  3. In the Details panel, find Interfaces → Implemented Interfaces
  4. Click Add and search for "Agentic Targetable"
  5. Add the interface

Enemy with IAgenticTargetable interface

6b. Implement CanBeTargeted (Required)

You MUST implement CanBeTargeted to return true, otherwise targeting won't work.

  1. In My Blueprint panel, find Interfaces → Agentic Targetable
  2. Double-click CanBeTargeted to create the event
  3. Connect a Return Node with Return Value = true

CanBeTargeted implementation

Why is this required? Blueprint interface functions return false by default. Without this implementation, all lock attempts will fail.

6c. Implement IsTargetAlive (Required)

You MUST also implement IsTargetAlive to return true.

  1. In My Blueprint panel, find Interfaces → Agentic Targetable → IsTargetAlive
  2. Double-click IsTargetAlive to create the event
  3. Connect a Return Node with Return Value = true

IsTargetAlive implementation

Tip: For actual gameplay, connect this to your health check (e.g., Health > 0).

C++ Setup (Alternative)

#include "IAgenticTargetable.h"

UCLASS()
class AMyEnemy : public ACharacter, public IAgenticTargetable
{
    GENERATED_BODY()

    virtual bool CanBeTargeted_Implementation(AActor* Targeter) const override
    {
        return true;  // Required for targeting to work
    }

    virtual bool IsTargetAlive_Implementation() const override
    {
        return true;  // Or: return Health > 0;
    }
};

Step 7: Add Target Indicator Widget (Optional)

Add a visual indicator widget to enemies that shows when they're targeted.

7a. Create the Widget Blueprint

  1. Content Browser → Right-click → User Interface → Widget Blueprint
  2. Name it WBP_TargetIndicator
  3. Design your indicator (e.g., diamond shape, reticle, health bar)

7b. Add Widget Component to Enemies

  1. Open your Enemy Blueprint (e.g., BP_CombatEnemy)
  2. In the Components panel, click Add
  3. Search for Widget and add a Widget Component
  4. Rename it to WBP_TargetIndicator

Widget component on enemy

  1. In the Details panel, configure:
    • Widget Class: Select your widget (a basic WBP_Target is included in the plugin)
    • Space: Screen for 2D overlay indicators
    • Draw Size: Adjust as needed (e.g., 16x16 for small reticle)
    • Visible: false (hidden by default, shown when targeted)

Widget component details

7c. Toggle Widget Visibility

In your enemy Blueprint, implement the IAgenticTargetable interface events to show/hide the widget:

  1. Event OnBecameTarget → Set Widget Visibility to true
  2. Event OnLostTarget → Set Widget Visibility to false

Widget visibility blueprint

The interface provides these parameters:

  • Targeter: The actor targeting this enemy
  • bIsLocked: true for hard lock, false for soft lock

Step 8: Configure Targeting Style

Now configure the targeting style on your character's AgenticTargetingComponent.

  1. Open your Character Blueprint
  2. Select the AgenticTargetingComponent
  3. In the Details panel, set:
    • Default Preset Tag: Agentic.Targeting.Preset.Ranged (or SoulsLike, Melee, etc.)
    • Default Style Tag: Agentic.Targeting.Style.Souls (or Freeflow, CombatAwareness, etc.)

Style configuration

Available Presets

Preset TagDescription
Agentic.Targeting.Preset.SoulsLike15m range, 90° cone, closest first
Agentic.Targeting.Preset.Ranged30m range, 45° cone, aim-aligned
Agentic.Targeting.Preset.Melee5m range, 180° cone, closest first
Agentic.Targeting.Preset.Freeflow8m range, 360°, movement-aligned

Available Styles

Style TagBehavior
Agentic.Targeting.Style.SoulsHard lock, toggle on/off, stick to switch
Agentic.Targeting.Style.FreeflowSoft lock, auto-switch per attack
Agentic.Targeting.Style.CombatAwarenessMulti-target awareness, no hard lock

Step 9: Test Lock-On

Now let's set up input to test the targeting system.

9a. Create Input Action

  1. In Content Browser, right-click → Input → Input Action
  2. Name it IA_LockOn
  3. Set Value Type to Digital (bool)

9b. Add to Input Mapping Context

  1. Open your Input Mapping Context (e.g., IMC_Default)
  2. Add a mapping for IA_LockOn
  3. Bind it to a key (e.g., Tab or Middle Mouse Button)

9c. Set Up Blueprint Logic

In your PlayerController Blueprint:

  1. Add an Enhanced Input Action event for IA_LockOn
  2. Get reference to your Agentic Targeting Component
  3. Call Lock() on Triggered:

Lock-on blueprint

The Lock() function uses your configured Style to determine behavior:

  • Hard Lock styles (Souls): Toggle lock on/off, stick to switch targets
  • Soft Lock styles (Freeflow): Auto-updates target each attack
  • Combat Awareness: Multi-target tracking, no hard lock

9d. Test in Editor

  1. Play in Editor (PIE)
  2. Place an enemy actor with IAgenticTargetable interface in your level
  3. Look toward the enemy and press your lock-on key
  4. You should see:
    • Debug sphere around found targets (if Debug Draw is enabled)
    • Target indicator widget on the locked enemy (if configured)
    • Log messages in Output Log: LogAgenticTargeting: ...

Troubleshooting

IssueSolution
No targets foundCheck enemy has IAgenticTargetable interface
Targets found but LOS failsCheck Trace Channel in preset's LOS filter task. Default ECC_Visibility may be blocked by your collision setup. Try ECC_Camera or a custom channel
Lock() does nothingCheck Output Log for warnings. Ensure Style is configured and ASC is on character
Component not foundEnsure component is on PlayerController, not Character
"No ASC found" warningAdd AbilitySystemComponent to your character (GAS is required)

Step 10: Death Delegate (Optional)

For instant lock-break when a target dies, implement the death delegate:

// In your enemy - broadcast when dying:
OnDeathDelegate.Broadcast(this);

This instantly notifies all players locked onto this enemy to break their lock. See API Reference for full interface details.


Next Steps