
Unreal Engine 5 Enemy AI #2 – Patrol Paths, NavMesh & Animation Fix Blueprint Only
Part 2 of the UE5 Enemy AI Series. Learn to set up NavMesh, patrol paths, patrol loops, and fix sliding animation bugs—all in Blueprints with no C++ or Behavior Trees.
Welcome back to the Enemy AI Series in Unreal Engine 5.
In Part 1, we created an enemy character and gave it AI Sight using Blueprints. In this part, we’ll go further by making our AI patrol the level, follow patrol paths with tags, and fix that common sliding animation bug. All done with Blueprints only—no C++ or Behavior Trees.
🌟 What You’ll Learn
- Setting up NavMesh Bounds Volumes so AI can walk the map
- Creating and tagging patrol points (Target Points) for multiple routes
- Building a simple patrol loop in Blueprints
- Making patrols randomized for more realism
- Using instance-editable variables for flexible AI paths
- Fixing AI sliding animation bug with one setting
- Running multiple enemies, each on their own path
- Preparing for advanced AI behavior in future episodes
📝 Chapters
- 0:00 – Intro & What’s Next
- 0:12 – Quick Recap: Last Episode (AI Sight)
- 0:17 – What We’ll Build: NavMesh & Patrol Paths
- 0:27 – Why We Need NavMesh for AI
- 0:45 – Adding NavMesh Bounds Volume
- 1:12 – Adjusting NavMesh Size & Location
- 1:35 – Visualizing NavMesh with P Key
- 1:51 – Tips for Large Maps & Multiple NavMeshes
- 2:00 – Placing Patrol Points (Target Points)
- 2:25 – Four Patrol Points for Path 1
- 2:34 – Adding Tags to Patrol Points
- 2:53 – Tagging Multiple Points at Once
- 3:10 – Double-Check Tag Spelling!
- 3:16 – Creating Patrol Path 2
- 3:46 – Review: 8 Target Points, 2 Paths
- 4:14 – Blueprint Setup in BP_EnemyGuard
- 4:39 – Get All Actors with Tag + Variable Setup
- 5:29 – Randomizing Patrol Points
- 5:41 – AI MoveTo Node
- 6:07 – Delay for Realistic Pause
- 6:20 – Creating the Patrol Loop
- 6:45 – Expanding the Blueprint
- 7:10 – Sliding Animation Bug Explained
- 7:22 – Fixing Animation (Use Acceleration for Paths)
- 7:55 – Proper Patrol Animations
- 8:01 – Next Steps: Chasing & Sound Sensing
- 8:13 – Outro
🟩 Step 1: Add NavMesh Bounds Volume
- Open your map.
- Quick Add → search for NavMesh Bounds Volume → drag into level.
- Reset Location X, Y, Z = 0, Rotation = 0 (clean setup).
- In Details → Brush Settings, set size. Example:
- X =
7000
- Y =
8000
- Z =
1200
- X =
- To visualize: click in viewport and press P.
- Green overlay = where AI can walk.
- Tip: For large maps, use multiple smaller NavMeshes instead of one giant one.
🎯 Step 2: Place Patrol Points
- Quick Add → search Target Point → drag into level.
- With it selected, Alt + drag to duplicate.
- Place 4 points total → spread them around for a patrol route.
- In Details, search for Tags → add
"path1"
(lowercase, no spaces). - Select remaining 3 points → multi-select → add same tag
"path1"
.
👉 Check spelling. Wrong tags = AI won’t find patrol points.
🎯 Step 3: Create a Second Patrol Path
- Select a Target Point → Alt + drag → duplicate into another area.
- Add new tag
"path2"
. - Duplicate until you have 4 points tagged path2.
Now you should have 8 Target Points total:
- 4 with path1
- 4 with path2
Zoom out to verify → 2 clear patrol routes across the level.
🧩 Step 4: Blueprint Patrol Logic
Open BP_EnemyGuard.
- Locate Event BeginPlay.
- Drag off → add Get All Actors with Tag.
- Right-click Tag pin → Promote to Variable.
- Name variable PatrolTag.
- In Details → check Instance Editable.
- Default =
"path1"
.
👉 This lets you assign different paths per AI instance in the editor.
-
From Out Actors, drag off → add Random Array Item.
- Ensures enemy doesn’t always pick same patrol point.
-
Drag off → add AI MoveTo.
- Target Actor = Random Array Item
- Pawn = Self
-
From On Success → add Delay (2 sec).
- Gives pause at patrol point.
-
After Delay → loop back to Get All Actors with Tag.
💡 Result: AI picks random patrol point → walks there → waits → repeats forever.
👥 Step 5: Multiple AI with Different Patrol Paths
- In your map, Alt + drag to duplicate your BP_EnemyGuard.
- For one AI, set PatrolTag = path1.
- For another AI, set PatrolTag = path2.
- Press Play → each enemy now follows its own route.
🐾 Step 6: Fix Sliding Animation Bug
Problem: AI slides instead of playing run animation.
Fix:
- Open BP_EnemyGuard.
- Select Self (root).
- In Details → Nav Movement Properties:
- Enable Use Acceleration for Paths.
- Compile & Save.
Now AI transitions correctly between walk/run animations.
🎥 Subtitle (Narration Flow)
“Hey, it’s Rumbod here. Last time we set up AI Sight. Now, let’s make our enemy patrol the level. Step one, add a NavMesh Bounds Volume so AI can walk. Resize it to cover your map, and press P to see the green overlay. Step two, add Target Points and tag them as path1. Duplicate and create a second set as path2. Step three, in BP_EnemyGuard, use Get All Actors with Tag, randomize patrol points, and use AI MoveTo to send enemies there. Add a delay and loop it back for endless patrol. Expose the PatrolTag variable so each enemy can have its own path. Finally, fix sliding animation by enabling Use Acceleration for Paths. Now your AI runs smoothly along patrols. In the next episode, we’ll add chasing and sound sensing.”
✅ Summary
By the end of this part you have:
- NavMesh set up for enemy navigation
- Target Points with tags for patrol routes
- Blueprint patrol logic with looping and randomization
- Multiple enemies, each with unique patrols
- Fixed sliding animation bug
📦 Project files: GitHub Repo
🌐 More tutorials: rambod.net
💬 Have questions? Drop them in the comments—I reply to everyone.
🔔 Subscribe for Part 3: Chasing & Sound Sensing
📺 Watch the full video here:
👉 https://www.youtube.com/watch?v=UzWGvepElpw