UE5 Enemy AI Setup with Sight
UE5 Enemy AI Setup with Sight
Every enemy AI system needs a starting point. Before patrols, chasing, hearing, distractions, or combat, you need a basic enemy character that actually exists in the level, uses the right mesh and animation, and can detect the player.
In this tutorial, you will build the first foundation of an Unreal Engine 5 enemy AI system using Blueprints only. You will create a fresh Third Person project, organize the project folders, build a custom enemy Character Blueprint, assign the skeletal mesh and animation Blueprint, add the AI Perception component, and configure AI Sight so the enemy can visually detect the player.
This is the first practical step in building a reusable enemy AI workflow. It is simple, but it matters. If this setup is wrong, everything you add later becomes harder to trust and harder to debug.
Watch the full video on YouTube: Unreal Engine 5 Enemy AI Series #1 – Setting Up Enemy Blueprint and AI Sight Blueprint Only
Project files: AIUnreal on GitHub
Subscribe for more Unreal Engine tutorials: Rambod YouTube Channel
What You Will Build
- A new Unreal Engine 5 project using the Third Person template
- A clean AI folder for enemy-related Blueprints
- A custom enemy Character Blueprint
- A skeletal mesh and animation Blueprint assigned to the enemy
- An AI Perception component
- An AI Sight configuration with working vision
- A placed enemy in the level that can visually detect the player
- A debug workflow for checking AI perception in-game
Why Start with AI Sight?
Sight is one of the most common senses for game AI. Even simple enemies often need to know whether the player is in front of them, inside a vision radius, or outside their field of view.
AI Sight is a strong first step because it teaches several important ideas at once:
- how Unreal structures AI perception
- how enemy actors are built from Character Blueprints
- how perception settings affect gameplay feel
- how to debug what the AI is actually sensing
Once sight works, you can build patrol, chase, hearing, forgetting, and combat behavior on top of it.
Step 1: Create a New Project
Open the Unreal Project Browser and create a new game project.
Use these settings:
- Template: Third Person
- Variant: standard Third Person, not a special variant
- Project Type: Blueprint
- Target Platform: Desktop
- Quality Preset: Maximum
Name the project something like:
AIUnreal
This gives you a clean base project with a ready player character, movement setup, camera, and a simple testing environment.
Why the Third Person Template Is a Good Starting Point
The Third Person template gives you a playable character immediately, which makes AI testing easier from the start. You do not need to waste time building a player controller, player movement, or camera system before you can even see if the enemy notices you.
It is not the only valid starting template, but it is a strong practical one for beginner AI tutorials.
Step 2: Organize the Project Folders
Open the Content Drawer and create a new folder named:
AI
This is where you will store enemy Blueprints and AI-related assets for this series.
You will still keep the default template folders such as:
- Characters
- Input
- ThirdPerson
- LevelPrototyping
But by creating an AI folder immediately, you prevent the project from becoming a junk drawer as the system grows.
Why Folder Organization Matters Early
Beginners often ignore project organization because the project is small. Then a few weeks later, nothing is named consistently, assets are spread everywhere, and simple tasks take longer than they should.
Creating a dedicated AI folder early is basic discipline. It saves time later.
Step 3: Create the Enemy Character Blueprint
Inside the AI folder, create a new Blueprint Class.
Choose:
Character
as the parent class.
Name the Blueprint:
BP_EnemyGuard
Using Character as the parent is important because it already includes movement support, a capsule, mesh handling, and integration with character movement systems.
If you choose Actor instead, you would need to build more of that yourself.
Why Use Character Instead of Actor?
A Character Blueprint is the right fit here because an enemy guard is expected to move around the map, use animations, and eventually patrol, chase, and react to the player.
Character gives you:
- a capsule component
- a skeletal mesh component
- Character Movement
- better compatibility with navigation and AI movement
That is a better foundation than trying to fake movement on a plain Actor.
Step 4: Assign the Enemy Mesh
Open BP_EnemyGuard and select the Mesh component.
In the Details panel, assign a skeletal mesh such as:
SKM_Quinn_Simple
This is a practical starter mesh because it is already part of Unreal’s standard third-person content.
The main goal at this stage is not making the enemy visually unique. The goal is getting a working AI character into the level fast.
Step 5: Assign the Animation Blueprint
With the Mesh component still selected, go to the Animation settings and set:
- Animation Mode: Use Animation Blueprint
- Anim Class: ABP_Unarmed
This gives the enemy a usable animation setup right away.
Without an animation Blueprint, the enemy may exist visually but not animate properly once movement begins later in the series.
Step 6: Adjust the Mesh Transform
In many Unreal character setups, the skeletal mesh needs an offset relative to the capsule to line up correctly.
Example transform adjustments:
- Location Z: -80
- Rotation Yaw: -90
This helps align the mesh correctly with the Character Blueprint’s orientation and capsule.
The exact values may vary depending on the mesh used, but with Quinn this is a common adjustment.
Why Mesh Alignment Matters
If the mesh is rotated wrong or positioned badly, the enemy can appear sideways, offset from the capsule, or visually disconnected from movement and perception.
Fix it now. Small setup errors get uglier later when you start adding patrol or chase behavior.
Step 7: Add the AI Perception Component
In BP_EnemyGuard, add a new component:
AI Perception
This is Unreal Engine’s built-in perception system for senses like sight, hearing, and damage.
In this first episode, you are focusing only on sight, but the same component will later support hearing and more advanced perception-driven logic.
Step 8: Set the Dominant Sense
Select the AI Perception component.
In the Details panel, set:
Dominant Sense = AI Sense Sight
This tells the component that sight is the primary perception type for this enemy setup.
Step 9: Add the AI Sight Sense Configuration
Still inside the AI Perception settings, find:
Senses Config
Click the plus button and add:
AI Sight Config
This is where you define how far the enemy can see, how wide their vision cone is, and who they are allowed to detect.
Step 10: Configure the AI Sight Settings
Adjust the main vision values to sensible gameplay values.
You can tune these based on your project, but the important fields are:
- Sight Radius
- Lose Sight Radius
- Peripheral Vision Half Angle
- Debug Color
For a beginner setup, a Peripheral Vision Half Angle of:
90
gives the enemy a forward-facing 180-degree vision area, which is easy to understand for early testing.
What These AI Sight Values Mean
Sight Radius
The maximum distance at which the enemy can initially see a target.
Lose Sight Radius
Usually slightly larger than Sight Radius, so the enemy does not instantly lose the player the moment they move just outside the main radius.
Peripheral Vision Half Angle
The half angle of the vision cone. A value of 90 means the AI can see 90 degrees to either side of its forward direction, which effectively gives a 180-degree forward-facing field.
Debug Color
The color used in debugging tools for visualizing this sense. Green is a good obvious choice for sight.
Step 11: Enable Detection by Affiliation
In the AI Sight configuration, expand:
Detection by Affiliation
Make sure:
Detect Neutrals = enabled
This matters because, in many simple template projects, the player is treated as a neutral actor by default.
If Detect Neutrals is not enabled, your AI may fail to detect the player even though everything else looks correct.
Why Detection by Affiliation Is Easy to Miss
This is one of those Unreal settings that can break perception while still looking like the setup is fine.
Developers often configure the sight radius, field of view, and debug color correctly, then wonder why the enemy still sees nothing. The answer is often just that the target’s affiliation is not enabled for detection.
So yes, this small checkbox matters.
Step 12: Compile and Save
Compile and save BP_EnemyGuard after finishing the sight setup.
Do not leave this until later. Save each stable step so you do not lose track of what broke if something changes afterward.
Step 13: Place the Enemy in the Level
Drag BP_EnemyGuard from the Content Drawer into your level.
Put it somewhere visible so you can easily test the player approaching and entering the AI’s sight cone.
At this stage, the enemy is not yet patrolling or chasing. The immediate goal is only to confirm that the perception setup works.
Step 14: Test the AI Sight System
Press Play and move the player around the enemy.
You now want to visualize what the AI is seeing.
During gameplay, open the AI debug view using:
apostrophe key
then numpad 4
This should display AI perception information, including the sight visualization and detection state.
What You Should See in the Debug View
With the AI debugger active, you should see visual indicators for the enemy’s perception, such as:
- the sight radius
- the vision cone or forward-facing perception area
- sight-related debug information
- stimulus or detection state changes when the player enters view
The exact look of the debugger may vary slightly by engine version, but the goal is the same: confirm that the enemy can actually detect the player.
Why the Debugger Matters
Do not build AI blindly.
The AI debugger helps you answer simple but critical questions:
- Is the enemy seeing the player?
- Is the vision cone facing the right direction?
- Is the sight radius large enough?
- Is affiliation filtering blocking detection?
Debug tools save time. Use them.
Common Problem: The Enemy Does Not Detect the Player
If the enemy seems blind, check these first:
- Is AI Perception added to the Blueprint?
- Is AI Sense Sight configured in Senses Config?
- Is Detect Neutrals enabled?
- Is the enemy facing the player?
- Is the sight radius large enough?
- Is the player actually inside the vision cone?
Most of the time, it is one of these simple setup issues.
Common Problem: The Mesh Faces the Wrong Direction
If the enemy seems to visually face one way while the sight cone behaves differently, your mesh transform may be wrong.
Recheck:
- mesh yaw offset
- mesh location offset
- capsule orientation
The Character actor’s real forward direction matters more than what you think the mesh looks like.
Common Problem: AI Debugger Does Not Show What You Expect
The AI debugger is useful, but Unreal is still Unreal. If the debug display behaves strangely:
- make sure the enemy actor is selected or relevant in the debugger
- check that the correct debug category is active
- retest in a clean play session
Do not assume the whole AI setup is broken just because the debugger is being weird.
What Comes Next After AI Sight?
Once the enemy can see the player, the next logical systems are:
- patrol routes
- chasing
- forgetting logic
- hearing and distractions
- damage reactions
- health and death logic
But all of that depends on this first foundation being correct. If the enemy cannot even detect the player properly, later AI behavior becomes harder to debug.
Why This Blueprint-Only Start Is Useful
Starting with Blueprints only is useful because it keeps the barrier low while still teaching the correct engine systems.
You are learning:
- Character setup
- mesh and animation assignment
- AI Perception configuration
- debug workflow
Later, if you move into C++, the engine concepts stay the same. The difference is only how you implement them.
Conclusion
In this tutorial, you created a new UE5 project, organized the content folders, built an enemy Character Blueprint, assigned a skeletal mesh and animation Blueprint, added AI Perception, configured AI Sight, enabled neutral detection, and tested visual detection using Unreal’s AI debug tools.
That gives you the first real foundation of an enemy AI system in Unreal Engine 5 using Blueprints only.
Watch the full tutorial on YouTube: Unreal Engine 5 Enemy AI Series #1 – Setting Up Enemy Blueprint and AI Sight Blueprint Only
Download the project files: AIUnreal GitHub Repository
Subscribe for the next part of the enemy AI series: Subscribe to Rambod on YouTube
Resources
Frequently Asked Questions
How do I make an enemy see the player in Unreal Engine 5?
Add AI Perception to the enemy Blueprint, set the dominant sense to AI Sight, configure the sight values, and enable the correct detection affiliation such as Detect Neutrals.
Why use a Character Blueprint for the enemy?
Character gives you movement, a capsule, skeletal mesh support, and better compatibility with future AI navigation and chase systems.
Why is Detect Neutrals important?
In simple UE5 template setups, the player often counts as neutral. If Detect Neutrals is disabled, the enemy may never see the player.
How do I debug AI sight in Unreal Engine?
During Play mode, use the AI debug tools such as apostrophe and numpad 4 to visualize perception and confirm whether the enemy detects the player.
Why does my enemy face the wrong way?
The mesh transform may be rotated incorrectly relative to the Character actor’s forward direction. Recheck mesh location and yaw offsets.
Is Blueprint enough for enemy AI in Unreal Engine?
Yes, for many systems. You can build patrols, sight detection, chasing, hearing, distraction systems, damage reactions, and more in Blueprints before needing C++.
Continue Unreal Engine 5 Enemy AI Series – Beginner Blueprint Tutorials
Back to Unreal Engine 5 Enemy AI Series – Beginner Blueprint Tutorials playlist • Lesson 1 of 12
Recommended resource
Recommended for this tutorial
Useful tools selected for this workflow topic.