UE5 AI Patrol Paths and NavMesh
UE5 AI Patrol Paths and NavMesh
A guard that can only stand still and look around is not much of an enemy. The moment that guard starts moving through the level, following routes, turning corners, and playing proper movement animations, the AI starts feeling like part of the game instead of a placeholder.
In this tutorial, you will build a complete Blueprint-only patrol system in Unreal Engine 5. You will set up a NavMesh so the AI can navigate the level, place Target Points to define patrol routes, use Actor Tags to separate multiple paths, create a patrol loop in Blueprint, randomize patrol destinations, and fix the common animation issue where the AI slides instead of running.
There are no Behavior Trees here and no C++. This is a clean, direct system for getting useful enemy movement working quickly while still keeping the setup modular enough to expand later.
Watch the full video on YouTube: Unreal Engine 5 Enemy AI – Patrol Paths, NavMesh & Animation Fix Blueprint Only
Project files: AIUnreal on GitHub
Subscribe for more Unreal Engine tutorials: Rambod YouTube Channel
What You Will Build
- A NavMesh setup so AI enemies can move across the map
- Two patrol paths built from Target Points
- Tagged patrol points so different enemies can use different routes
- A Blueprint patrol loop using AI Move To
- Randomized patrol target selection for less robotic behavior
- An instance-editable patrol tag variable for easy reuse
- A fix for the sliding animation bug using path acceleration
Why NavMesh Matters for AI Patrols
If your AI is supposed to move through the world, Unreal needs a navigation surface that tells it where movement is possible. That is what the NavMesh does.
Without a NavMesh:
- AI Move To usually fails
- the enemy may stand still
- pathfinding will not work properly
- patrol points become meaningless because the AI has no valid route
A lot of people try to debug Blueprint logic first when their AI does not move, but the problem is often much simpler. No NavMesh, no navigation.
How This Patrol System Works
The full system is simple:
- Create a NavMesh that covers the playable area.
- Place Target Points in the level.
- Tag those Target Points by route name, such as path1 and path2.
- In the enemy Blueprint, store a PatrolTag variable.
- At runtime, get all actors with that tag.
- Pick one patrol point, optionally at random.
- Use AI Move To to walk to it.
- Wait briefly.
- Repeat forever.
That gives you a reusable Blueprint patrol setup that can support multiple AI guards with different routes.
Step 1: Add a NavMesh Bounds Volume
Open your level and place a NavMesh Bounds Volume.
You can add it from:
Quick Add > NavMesh Bounds Volume
Place it in the level and scale it so it covers the area where your AI should be able to patrol.
Example values used in the tutorial:
X = 7000
Y = 8000
Z = 1200
These numbers are only example values. Your level size may be completely different.
Step 2: Visualize the NavMesh
After placing the NavMesh Bounds Volume, click in the viewport and press:
P
Unreal will display the navigation surface as a green overlay.
Anywhere you see green is generally an area the AI can walk.
This is one of the fastest ways to debug navigation setup. If you expected the AI to move somewhere and there is no green surface there, the patrol will fail no matter how good the Blueprint logic is.
Tips for Large Maps
On larger maps, do not mindlessly use one huge NavMesh if the whole level does not need active navigation all at once.
Smaller or more intentional NavMesh coverage can be better for organization and performance, especially in bigger projects.
For this tutorial, a single volume is fine. But as the game grows, think about where navigation is actually needed.
Step 3: Place the Patrol Points
Now create the points the AI will patrol between.
Add a Target Point actor to the level:
Quick Add > Target Point
Place one, then duplicate it using Alt + drag until you have four patrol points for your first route.
Spread them around the environment in a believable pattern. Do not just throw them randomly unless random nonsense is the design.
Step 4: Tag the First Patrol Route
Select the first set of four Target Points.
In the Details panel, search for:
Tags
Add the tag:
path1
Make sure the spelling is exact. Tags are simple text identifiers. If your Blueprint looks for path1 and one point is tagged Path1 or path 1, that point will not be found.
This is one of those tiny mistakes that wastes time for no good reason.
Step 5: Create a Second Patrol Route
Duplicate the Target Points or place a second set elsewhere in the level.
Create four more patrol points for the second route and tag them:
path2
Now your level should have:
- 4 Target Points with tag path1
- 4 Target Points with tag path2
At this stage, your level is prepared for multiple enemies using different patrol routes.
Why Actor Tags Work Well Here
For a simple Blueprint-only patrol system, Actor Tags are a practical way to separate patrol groups.
They are:
- easy to assign in the editor
- easy to query in Blueprint
- good enough for small and medium patrol setups
- easy to understand for beginners
Later, in larger systems, you might outgrow plain tags and move to data-driven setups, patrol components, or Behavior Trees. But for a clean early-series Blueprint workflow, tags are perfectly fine.
Step 6: Open BP_EnemyGuard
Now move into the enemy Blueprint where the patrol logic will live.
Open:
BP_EnemyGuard
This is where the AI decides which patrol route to use and where to move next.
Step 7: Create the PatrolTag Variable
In BP_EnemyGuard, create a variable named:
PatrolTag
Use a Name or String type, depending on your preferred setup, and mark it as:
Instance Editable
Set the default value to:
path1
This is very important. By exposing PatrolTag in the editor, each placed enemy can be assigned a different route without needing duplicate Blueprints.
Why Instance Editable Is the Right Move
If PatrolTag is not instance editable, every enemy that uses BP_EnemyGuard will share the same default route unless you hardcode more logic.
With instance editing enabled, one enemy can use path1 and another can use path2, all from the same Blueprint class.
That is the right direction for reusable AI setup.
Step 8: Get All Patrol Points with the Matching Tag
In the Event Graph, usually starting from Begin Play or from your patrol loop entry point, add:
Get All Actors with Tag
Connect the PatrolTag variable into the Tag input.
This returns all Target Points in the level whose tag matches the enemy’s PatrolTag value.
Step 9: Pick a Patrol Point
From the Out Actors array, add:
Random Array Item
This makes the patrol less robotic by not always choosing the exact same next point in the same fixed order.
Random selection is a simple way to make movement feel a bit more natural without building a more advanced state system yet.
Random Patrols vs Ordered Patrols
A random patrol is not always better than an ordered patrol. It depends on the design.
Random patrols are useful because:
- they feel less predictable
- they add variation
- they are easy to implement
Ordered patrols are useful because:
- they are easier to control
- they support more deliberate guard routes
- they are easier to design around for stealth games
For this tutorial, random is fine because the goal is getting a working patrol system quickly.
Step 10: Move to the Patrol Point
From the selected patrol point, add:
AI Move To
Configure it like this:
- Pawn: Self
- Target Actor: Random Array Item result
This tells the enemy to walk to the selected patrol point using the NavMesh.
Step 11: Add a Delay at Each Patrol Point
From the On Success output of AI Move To, add a:
Delay
Example:
2.0 seconds
This pause makes the patrol feel more deliberate and less like the AI is instantly snapping from target to target.
After the delay, loop the execution back to your patrol point selection logic.
That creates an endless patrol cycle:
Pick point → Move → Wait → Pick point again
How the Patrol Loop Works
The full Blueprint flow is:
- Get all actors with the patrol tag
- Select one patrol point
- Move to it
- Wait for a short delay
- Run the same logic again
It is simple, but it works. That matters.
Too many beginners jump straight to complex AI systems before getting the simple loop working correctly.
Step 12: Place Multiple Enemies with Different Routes
Back in the level, place two BP_EnemyGuard actors.
For the first enemy, set:
PatrolTag = path1
For the second enemy, set:
PatrolTag = path2
Now each enemy will pull patrol points from a different group while still using the same Blueprint.
Step 13: Fix the Sliding Animation Bug
One of the most common problems in simple AI movement setups is that the enemy moves across the map but the animation does not transition correctly. Instead of walking or running, the enemy appears to slide.
To fix it, open BP_EnemyGuard and select the actor root or the relevant movement configuration area.
In the Nav Movement settings, enable:
Use Acceleration for Paths
This small setting is often the difference between proper movement animation blending and ugly sliding.
Why This Animation Fix Works
Many movement animation systems depend on acceleration data to drive blend spaces properly. If the AI path following does not use acceleration in a way the animation system expects, the character can move while the animation state does not respond correctly.
Enabling Use Acceleration for Paths gives the movement system more appropriate motion data, so the animation Blueprint can transition into moving states as expected.
This is one of those tiny Unreal settings that looks unimportant until it saves your setup.
Testing the Final Patrol System
Once everything is set up:
- press Play
- watch the first enemy patrol route path1
- watch the second enemy patrol route path2
- confirm both are moving across the NavMesh
- confirm they pause briefly at points
- confirm animations are playing properly instead of sliding
If all of that works, you now have a solid Blueprint patrol foundation.
Common Problem: AI Does Not Move
If the enemy refuses to move:
- make sure the NavMesh Bounds Volume covers the patrol area
- press P and confirm the ground is green
- make sure the Target Points are on reachable NavMesh
- make sure the enemy has a valid AI Controller
- make sure AI Move To is targeting a real actor
- make sure the patrol tag matches the level Target Points exactly
Most of the time, this is either a NavMesh problem or a tag problem.
Common Problem: AI Finds No Patrol Points
If Get All Actors with Tag returns nothing:
- check the patrol tag spelling
- check uppercase and lowercase consistency
- check that the Target Points actually have the tag assigned
- check that the enemy instance PatrolTag value matches the route tag
Tags are simple text values. A tiny typo is enough to break the whole patrol system.
Common Problem: AI Moves but Slides
If the enemy moves correctly but the animation looks wrong:
- enable Use Acceleration for Paths
- check the Animation Blueprint movement setup
- check that movement speed values are high enough to trigger locomotion states
- make sure the correct skeletal mesh and animation class are assigned
Sliding usually means the movement system and animation system are not talking to each other the way you expect.
Why This Blueprint System Is a Good Foundation
This patrol system is simple, but it creates the base for more advanced AI later.
Once patrol works, you can extend the enemy with:
- sight detection
- chase behavior
- forgetting logic
- hearing and distractions
- attack ranges
- suspicion states
- behavior trees later, if needed
But if basic movement and patrol are broken, every later AI feature becomes harder to debug.
What to Improve Later
This version uses random patrol points, which is good enough for a fast Blueprint tutorial. Later, you might want to improve it by:
- preventing the AI from picking the same patrol point twice in a row
- using ordered routes instead of random selection
- adding wait times per patrol point
- creating patrol route actors instead of plain tags
- switching to Behavior Trees when your AI grows more complex
For now, keep it simple and working.
Conclusion
In this tutorial, you set up a NavMesh, created tagged Target Points for multiple patrol routes, built a looping Blueprint patrol system using AI Move To, exposed a PatrolTag variable for easy editor control, and fixed the common AI sliding bug with Use Acceleration for Paths.
That gives you a practical, reusable AI patrol foundation in Unreal Engine 5 without using C++ or Behavior Trees.
Watch the full video on YouTube: Unreal Engine 5 Enemy AI – Patrol Paths, NavMesh & Animation Fix 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 AI patrol in Unreal Engine 5 without Behavior Trees?
You can place Target Points in the level, tag them by route, use Get All Actors with Tag in Blueprint, pick a patrol point, and move the AI with AI Move To in a loop.
Why does my AI not move to patrol points?
The most common reasons are missing NavMesh coverage, incorrect tags, unreachable patrol points, or missing AI Controller setup.
What does pressing P do in the viewport?
It toggles NavMesh visualization, showing where AI can walk as a green overlay.
Why is my AI sliding instead of running?
A common fix is enabling Use Acceleration for Paths so the movement system provides better data for the animation system.
Why should PatrolTag be instance editable?
It lets you place multiple enemies that all use the same Blueprint but follow different patrol routes assigned in the level editor.
Should I use random or ordered patrol points?
Both are valid. Random patrols are quick and add variation. Ordered patrols are more controlled and often better for stealth or carefully designed encounters.
Continue Unreal Engine 5 Enemy AI Series – Beginner Blueprint Tutorials
Back to Unreal Engine 5 Enemy AI Series – Beginner Blueprint Tutorials playlist • Lesson 2 of 12
Recommended resource
Recommended for this tutorial
Useful tools selected for this workflow topic.