UE5 AI perception: making enemies actually see you

By the Cosindra team · Updated August 7, 2026

AI perception is the part of Unreal’s AI stack that answers "can this enemy see the player". It is also the part that most often appears to be broken when it is merely unconfigured — the component is on the controller, the radius looks generous, and the enemy still walks past the player without reacting.

This guide covers what each sight setting actually controls, the two silent failures that account for most "my AI can’t see me" threads, and the editor calls that configure perception and hook it to patrol behaviour.

The sight settings, and what each one really means

Sight is configured by three numbers and they interact. Sight Radius is how far the AI can first notice something. Lose Sight Radius is how far that thing has to get before the AI forgets it — it must be larger than Sight Radius, otherwise detection flickers on and off at the boundary and the AI stutters between chasing and giving up.

Peripheral Vision Angle is measured as a half-angle from the forward vector, so 90 gives a 180° field of view, not 90°. Setting it to 180 gives the AI eyes in the back of its head, which is occasionally what you want for a turret and almost never what you want for a guard.

SettingControlsTypical trap
Sight RadiusDistance at which a target is first seenSet huge "to be safe", so the AI detects through the whole level
Lose Sight RadiusDistance at which a seen target is forgottenLeft equal to Sight Radius — detection flickers at the edge
Peripheral Vision AngleHalf-angle of the view coneRead as a full FOV, so the cone ends up twice the intended size
Max AgeHow long a stimulus stays rememberedLeft at 0, meaning it never expires

Failure one: the target is not a registered stimuli source

Perception does not scan the world for meshes. It scans for registered stimuli sources, and something that has not registered is invisible no matter how close it stands. If your target is a custom actor rather than a Pawn, it needs an AI Perception Stimuli Source component, registered for the Sight sense and registered with the perception system.

This is the first thing to check, because everything looks correct from the AI’s side — the component is there, the config is there, and the debug view simply shows nothing being detected.

Failure two: everything is Neutral

Sight config has a Detection by Affiliation block with three checkboxes: enemies, neutrals, friendlies. By default only enemies is ticked. Affiliation comes from team IDs, and an actor that has not been given one is Neutral — so a default setup detects nothing at all, because there are no enemies as far as the engine is concerned.

Two ways out. The quick one is to tick Detect Neutrals while you are prototyping. The correct one is to implement the team-agent interface on your controllers so guards and the player are on genuinely different teams, which you will want anyway the moment you have more than one faction.

The editor calls that set it up

Perception on its own only produces events. Pairing it with patrol behaviour is what turns it into an enemy — the calls below do both, and the resulting state is what a behavior tree reads.

#ToolWhat it does
1configure_npc_perceptionSets sight radius, lose-sight radius, peripheral angle and affiliation
2setup_npc_patrolDefines the patrol route the NPC walks while it has seen nothing
3start_npc_patrolStarts the route, so behaviour is visible in PIE immediately
4start_npc_followSwitches the NPC to following a target once one is detected
5get_npc_stateReads back the current state to confirm detection actually fired

Debugging it in one keypress

Play in the editor and press the apostrophe key to open the AI debugger, then the number key for the perception category. You get the sight cone drawn in the world and the list of currently perceived actors.

This turns the question from "why doesn’t it work" into something answerable in seconds: if the cone is not drawn, the component is not configured; if the cone is drawn but the player never appears in the list, you are looking at one of the two failures above.

Put an AI copilot inside your editor

The free Cosindra desktop app connects to your UE 5.7/5.8 project — the assistant works in your open editor, and what you generate with the web tools applies straight into it. Windows & macOS.

Download Cosindra

Frequently asked questions

Why can’t my UE5 AI see the player even though the sight radius is huge?

Two causes account for nearly all of it. Either the target is not a registered stimuli source — perception only sees actors registered with the perception system, so a custom actor needs an AI Perception Stimuli Source component registered for Sight — or affiliation is filtering it out: Detection by Affiliation defaults to enemies only, and an actor with no team ID counts as Neutral, so nothing qualifies. Tick Detect Neutrals to confirm that is the cause, then set up team IDs properly.

Should Lose Sight Radius be bigger than Sight Radius?

Yes, always. They are the two edges of a hysteresis band: the AI notices you at Sight Radius and forgets you at Lose Sight Radius. If they are equal, a target hovering at that exact distance is detected and dropped repeatedly, and the AI visibly stutters between chase and idle. A lose radius roughly 20-50% larger than the sight radius gives a stable "I have seen you, you are not escaping that easily" feel.

Does AI perception go on the Pawn or the AI Controller?

The AI Controller, normally. Perception is decision-making, and it belongs with the thing making decisions — the controller persists while pawns can be possessed and unpossessed, and the behavior tree already runs there. Putting it on the pawn works but means re-wiring whenever possession changes, and it splits perception away from the tree that consumes it.

Keep reading