Awareness System
Documentation Unreal Engine AI Awareness Perception
Give an enemy senses: it spots you on sight, hears what it cannot see, remembers where you went, and gives up when the trail goes cold.
An enemy that fights what it has noticed and ignores the rest. Sight fills a meter, a sound raises suspicion, a hit reveals the attacker, and losing you starts a countdown.
Set it up
45 seconds- 1
Create an Awareness Config
Right-click in the Content Browser, SEC, Awareness Config.Content Browser▸ ContentRight-click in the Content Browser, SEC, Awareness Config. The defaults are a working guard: 1500 cm of sight across a 180 degree cone, 1200 cm of hearing, and a damage sense that reveals whoever hits it. - 2
Point the AI Config at it
Open the enemy's Enemy AI Config, and under Awareness set Awareness Config to the asset. Leave Manage Awareness Automatically ticked.EnemyConfig_Grunt▾AwarenessManage Awareness AutomaticallyAwareness ConfigNone▾The controller applies the asset at possession, and builds the perception the enemy needs. Awareness lives on a SEC Awareness component on the AI controller, and Enemy Controller Base carries one already. On an AI controller of your own, add that component first, or the config is applied to nothing and the enemy senses nothing. - 3
Make combat obey it
On the same config, set Target Selector to Awareness Filtered Target Selector. That is the step that stops the enemy fighting people it has not perceived.EnemyConfig_Grunt▾Combat RoleTarget SelectorNoneExpand it and Min Required State appears, defaulting to Lost. - 4
Play, and walk into view
Press Play and runSEC.Debug.Awareness 1. Each enemy gets a line above its head naming its most-aware target, that target's state, and how full the meter is. Walk into the cone and watch it climb toDetected.
Skip the Target Selector and the enemy still engages anything in the fight, whether it has perceived that target or not. Awareness records everything correctly; nothing reads it. The log warns about this once at possession.
Once a target reaches Detected it joins the shared combat pool on its own, so an enemy with awareness starts its own fight. See Getting Started and Targeting.
The five states
Viewport
LVL_SEC_Showcase>Awareness
Seen = Detected. Lose sight = Lost (grace), then Forgotten, then Unknown.
| State | Means |
|---|---|
| Unknown | This enemy has no memory of the target. |
| Suspicious | Something registered: a sound, a glimpse at the edge of vision, a meter part way up. The enemy knows where the stimulus came from, not where the target is. |
| Detected | Confirmed. Live sight at a full meter, a hit taken, a point-blank target, or a scripted reveal. Last-known location tracks the target as it moves. |
| Lost | Was Detected, sight broke. Last-known location freezes at the moment of loss and the grace countdown runs. |
| Forgotten | The countdown ran out. The enemy announces it once and drops the memory, so the state reads Unknown after that. |
Anything that compares two states ranks them by confidence: Unknown lowest, then Forgotten, Suspicious, Lost, and Detected highest. That ordering is what Min Required State and the Awareness State At Least condition test against.
Tune how fast it notices you
Sight fills a 0 to 1 meter. Cross Suspicion Threshold and the enemy is Suspicious; reach 1 and it is Detected.
Details
SEC Awareness Config
Escalation
Gradual Escalation
Escalation Rate
0.9
Suspicion Threshold
0.2
Hearing Bump
0.5
Distance Rate Curve
None
Angle Rate Curve
None
Escalation category on the awareness config asset.
Escalation Rate is meter per second at best range and dead centre, so the 0.9 default is about 1.1 seconds to spot someone standing in front of the enemy. Drop it to 0.3 for a sleepy guard and raise it past 2 for an alert one.
Hearing Bump is where a sound puts the meter. It is floored at Suspicion Threshold and capped below 1, so a noise sends the enemy to investigate and no further.
Damage skips the meter. A hit sets it to 1 and the attacker is Detected at once, whatever the enemy was facing.
Distance Rate Curve and Angle Rate Curve scale the fill rate. Leave them empty and distance and angle change nothing. Fill them and the X axis runs 0 to 1: distance over Sight Radius, and angle over Peripheral Vision Half Angle, where 0 is dead centre and 1 is the edge of the cone. Y is the multiplier.
Untick Gradual Escalation for the flat version: sight fills at 1 per second, ignoring distance and angle, so anything in the cone is Detected in a second.
Tune how long it remembers
Details
SEC Awareness Config
Memory
Grace Loss Duration
5
Suspicious Decay Duration
8
Evaluation Interval
0.1
Track Last Known Location
Proximity
Proximity Radius
220
Hysteresis
Confirm Lost Delay
0.5
Memory category on the awareness config asset.
Grace Loss Duration is the chase tail. For those 5 seconds after sight breaks, the enemy stays engaged, and it snaps back to Detected the instant it sees the target again. Raise it for a dog that will not let go, drop it to 1 for an enemy you can lose around a corner.
Suspicious Decay Duration is the other clock. It drains the meter at 1/8 per second while nothing escalates, and the target is forgotten the moment the meter reaches zero, skipping Lost. A sound puts the meter at Hearing Bump 0.45, so a noise nobody follows up is forgotten about 3.6 seconds later.
Confirm Lost Delay absorbs brief breaks in sight. Without it, an enemy strafing past a pillar would flicker between Detected and Lost.
Proximity Radius is the point-blank floor. Inside 220 cm the meter fills at full speed with no line of sight needed. It holds a target the enemy already carries in memory rather than finding a new one: an enemy that has never seen, heard, or been hit by you keeps no record of you, and walking up behind it creates none. Break its sight and then close in, and it pins you back to Detected inside a second. Set it to 0 to allow a backstab from touching distance.
Tune what it senses
Details
SEC Awareness Config
Perception
Auto Create Perception Component
Sight
Enable Sight
Sight Radius
1500
Lose Sight Radius
1800
Peripheral Vision Half Angle
90
Sight Max Age
5
Hearing
Enable Hearing
Hearing Range
1200
Hearing Max Age
4
Damage
Enable Damage Sense
Perception tuning on the awareness config asset the Enemy AI Config points at.
Sight Radius is where the enemy can pick someone up; Lose Sight Radius is where an already-seen target drops out. Keep the second larger than the first, since a value below it is raised to match at runtime. Peripheral Vision Half Angle is measured from the enemy's forward vector, so 90 is a 180 degree cone and 45 is a 90 degree one.
Hearing Range answers noise the game reports, which means a Report Noise Event call or a Make Noise on an actor. Nothing is heard until something makes a noise.
Each sense has its own switch, so a blind enemy that hears is one untick away. Sight Max Age and Hearing Max Age cap how long the engine holds a stimulus before it counts as gone.
Sight and hearing pick up enemies and neutrals, not friendlies. An enemy defaults to Team Id 1 on its SEC Team component, and a plain player pawn carries no team, which reads as neutral and is sensed. Put the player on team 1 as well and the enemies go blind to it.
An enemy senses only actors it is willing to fight. The Target Filter on the AI Config decides that, and a stimulus from an ally is dropped whichever sense reported it, which is what stops a stray sweep from making a friend into a target. See Targeting.
Decide when combat drops
Min Required State on the Awareness Filtered Target Selector is the whole feel of disengagement.
Details
Awareness Filtered Target Selector
Awareness Filter
Min Required State
Lost
Inner Selector
None
Instanced selector on the Enemy AI Config. Needs a SEC Awareness component on the AI controller.
| Setting | Feel |
|---|---|
| Detected | Combat drops the moment sight breaks. Duck behind a wall and the fight stops, which is what a stealth patrol wants. |
| Lost | The default. Combat holds through the grace window and drops at Forgotten, so breaking sight buys you a few seconds rather than a clean escape. |
| Suspicious | The enemy will fight a target it has only heard. Good for something that hunts by sound. |
Inner Selector picks among what survives the filter. Leave it empty for the nearest candidate, or nest another target selector inside it.
Turn a camp instead of one guard
Tick Alert Allies On Detect on the Awareness Config and the first confirmed sighting is shared with nearby allies, so a whole camp turns.
| Field | Default | Does |
|---|---|---|
| Alert Allies On Detect | off | Shares a target the moment this enemy confirms it. |
| Ally Alert Radius | 1500 cm | How far the alert carries. Allies outside it hear nothing. |
| Ally Alert Cooldown | 3 s | Shortest gap between two alerts from this enemy, so a target flickering in and out cannot spam the camp. |
Allies need a SEC Awareness component of their own to be told, a matching team id, and Auto-Register for Combat Roles left ticked on their AI Config. The automatic alert reaches the enemies registered with the combat role system, and with none registered it logs that the alert reached nobody and stops. To fire an alert from a scripted cue instead (an alarm bell, a horn), call Broadcast Awareness To Allies with a radius and leave the tick off; that one sweeps the world, so it finds allies whether they registered or not.
React to what it notices
Bind these on the enemy controller's SEC Awareness component to drive patrol, investigate and return.
| Event | Fires when |
|---|---|
| On Target Suspicious | A target first reaches Suspicious. Carries the stimulus location, which is where to send the enemy to investigate. |
| On Target Spotted | A target first reaches Detected. |
| On Target Lost | A Detected target drops to Lost and the grace window opens. |
| On Target Forgotten | The memory is dropped. This is the cue to go home. |
| On Awareness Progress | The meter crosses a quarter step (0.25, 0.5, 0.75, 1.0). Drive a UI tick or an audio sting from it. |
| On Alert Level Changed | The highest state across all remembered targets changes. |
| On Target State Changed | Any transition, carrying the old and new state. |
Get Last Known Location returns where a target was last placed and how many seconds ago, which is what a search behaviour walks to. Get Awareness Progress feeds a meter bar: the live meter while Suspicious, 1 while Detected, and the draining grace fraction while Lost.
In StateTree, the Awareness State At Least condition branches the graph and the Poll Last Known Location task feeds an AI Move To.
Debug it
SEC.Debug.Awareness 1 // State, meter and last-known age above each enemy
SEC.Debug.All 1 // Every overlay at once
SEC.Debug.WatchPawn <name> // Narrow the overlays to one enemy
The line reads
awareness Detected BP_Player meter 1.00 seen 0.3s ago, or awareness aware of nothing when the enemy remembers no one. It is worked out on the server, so it draws there.The SEC Awareness component carries a Debug Overlay Awareness checkbox that turns the same drawing on for one enemy without the console, and it survives a restart.
AdvancedIt senses nothing
In the order worth checking:
- The player is on the enemy's team. Sight and hearing skip friendlies outright, and enemies default to Team Id 1.
- No Awareness Config. The component with no settings senses nothing and logs nothing. Check Awareness Config on the AI Config, and that Manage Awareness Automatically is ticked.
- Nothing is making noise. Hearing waits on a Report Noise Event; footsteps do not emit one on their own.
- The Target Filter refuses the actor. A stimulus from an actor this enemy will not fight is dropped before it reaches the memory, whichever sense reported it.
- The class is on Ignored Actor Classes. Debug and spectator pawns often end up there.
- Auto Create Perception Component is off with no perception component on the controller. Awareness warns once and stops.
- A client. Perception and awareness run on the server.
AdvancedIt senses everything, or forgets too fast
- It engages targets it has not seen. The Target Selector is something other than an Awareness Filtered Target Selector. The log says so at possession.
- It fights on after you break sight. That is Min Required State at Lost plus Grace Loss Duration. Set the state to Detected for an instant drop, or shorten the grace.
- It spots you through a wall. Proximity Radius ignores line of sight inside 220 cm for a target already in memory. Drop it to 0 to remove the floor.
- It flickers between states. Raise Confirm Lost Delay.
- A sound sends it straight into combat. Min Required State is on Suspicious, or Stimulus To State Map promotes hearing to Detected.
- The filtered selector passes everything through. No SEC Awareness component on the controller. It warns once per controller and stops filtering.
AdvancedEverything the component answers
Reads:
| Node | Answers |
|---|---|
| Get Awareness State | The state for one target, Unknown when there is no memory. |
| Get Awareness Progress | 0 to 1 for a UI bar: live meter while Suspicious, 1 while Detected, draining grace fraction while Lost. |
| Get Last Known Location | Where a target was last placed, plus its age in seconds. |
| Get Most Aware Target | The single target to react to, ranked by state and then by meter. |
| Get Targets In State | Everything at or above a state. |
| Get Highest Awareness State | The alert level across all remembered targets. |
| Get Awareness Entry | The whole record for one target. |
Writes:
| Node | Does |
|---|---|
| Force Aware Of | Set a state directly, for a cutscene sting or an alarm. Promoting to Detected fires the spotted event. Passing Unknown or Forgotten forgets the target instead. |
| Forget / Clear All Awareness | Drop one memory or all of them, with no events. |
| Set Awareness Enabled | Stop or start sensing while keeping the settings. Stopping forgets everything, which suits a dead or switched-off enemy. |
| Apply Config | Swap the whole config at runtime, for an enemy that gains sharper senses or is blinded mid-fight. Passing None stops sensing. |
| Broadcast Awareness To Allies | Push this enemy's Detected targets onto same-team allies within a radius. |
AdvancedMaking one target harder to notice than another
Awareness Rate Multipliers on the SEC Awareness component scales the gain from one sense across all targets: below 1 is harder to notice, above 1 easier, 0 mutes that sense. Set Awareness Rate Multiplier changes an entry at runtime, and each holds until changed again. Sight scales the meter fill rate; hearing scales the bump. A hit and the proximity floor ignore it, so neither can be muted this way.
For per-target rules (crouching, standing in shadow, an invisibility tag) override Get Awareness Rate Multiplier on a Blueprint subclass of the component. It receives the sense and the target and replaces the map.
Two more overrides on the same component:
- Should Ignore Actor blocks all senses for an actor. The default answers yes for anything listed in Ignored Actor Classes.
- Resolve Stimulus State decides what a sense is worth. The default reads Stimulus To State Map on the config, then falls back to sight and damage meaning Detected and everything else meaning Suspicious. Add a row to that map for an alert archetype whose hearing goes straight to Detected.
AdvancedWhich way the enemy looks while it searches
Face Last Known When Not Detected on the enemy controller (on by default) tracks the live target only while it is Detected. While Suspicious or Lost the enemy faces the last-known location instead, so it stops staring through a wall at someone it cannot see.
Untick it to track the target whatever the state. Override Get Desired Facing Location on the controller to replace the logic outright: the default answers for awareness facing and for a movement layer asking for travel-direction facing, so an override takes both. A rotation lock during an ability still outranks the override.
AdvancedPatrol, investigate, return
The shape most stealth loops take:
- Investigate a noise. Bind On Target Suspicious and send the enemy to the stimulus location it carries. If the target is visible when it arrives, the meter fills and the state goes to Detected; if not, it drains and the enemy forgets.
- Search after losing sight. Bind On Target Lost and walk the enemy to Get Last Known Location for the length of the grace window.
- Go home. Bind On Target Forgotten and send the enemy back. Territory gives it a home post and a leash to return to.
- A meter bar. Bind On Awareness Progress, or poll Get Awareness Progress on a widget tick.
In a StateTree, the same loop reads as one graph: patrol below Suspicious, investigate at Suspicious, combat at Detected, search at Lost through Poll Last Known Location, return on Forgotten. See StateTree Integration.
AlternativeSkip stealth entirely
Tick Always Aware on the Awareness Config for an arena or a boss room where the fight starts as the level loads. The enemy holds hostile combat targets at Detected without needing to see or hear them, and the meter, the sight cone and the hearing range stop mattering.
A target counts only after something registers it for combat, so pair this with a trigger or a spawner that calls Register Combat Target. See Getting Started.
AlternativeBring your own perception setup
Untick Auto Create Perception Component and add an AI Perception component to the controller yourself, configured however you like. Awareness binds to it and leaves its settings alone, so the sight, hearing and damage fields on the config stop applying.
Everything else on the config still applies: the meter, the memory windows, the proximity floor and the stimulus mapping all run on whatever stimuli your component reports. With no perception component and auto-create off, awareness warns once and stops updating.
Integration
| System | How they meet |
|---|---|
| Targeting System | The filtered selector gates candidates, and Min Required State sets the disengage feel. |
| StateTree Integration | Awareness State At Least condition, Poll Last Known Location task. |
| Territory & Patrols | Awareness decides what the enemy knows, territory decides where it belongs. Together they give patrol, investigate and return. |
| Attack Telegraphs | The Awareness filter on a trigger rule gates a reaction on whether the enemy already knows about the attacker. |
| Threat Detection | Awareness is what this enemy sensed. Threat is whether its target is looking back. |