Unreal Engine 5 Enemy AI #2 – Patrol Paths, NavMesh & Animation Fix Blueprint Only

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


📝 Chapters


🟩 Step 1: Add NavMesh Bounds Volume


🎯 Step 2: Place Patrol Points

  1. Quick Add → search Target Point → drag into level.
  2. With it selected, Alt + drag to duplicate.
  3. Place 4 points total → spread them around for a patrol route.
  4. In Details, search for Tags → add "path1" (lowercase, no spaces).
  5. 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

  1. Select a Target Point → Alt + drag → duplicate into another area.
  2. Add new tag "path2".
  3. Duplicate until you have 4 points tagged path2.

Now you should have 8 Target Points total:

Zoom out to verify → 2 clear patrol routes across the level.


🧩 Step 4: Blueprint Patrol Logic

Open BP_EnemyGuard.

  1. Locate Event BeginPlay.
  2. 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.

  1. From Out Actors, drag off → add Random Array Item.

    • Ensures enemy doesn’t always pick same patrol point.
  2. Drag off → add AI MoveTo.

    • Target Actor = Random Array Item
    • Pawn = Self
  3. From On Success → add Delay (2 sec).

    • Gives pause at patrol point.
  4. 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


🐾 Step 6: Fix Sliding Animation Bug

Problem: AI slides instead of playing run animation.

Fix:

  1. Open BP_EnemyGuard.
  2. Select Self (root).
  3. In Details → Nav Movement Properties:
    • Enable Use Acceleration for Paths.
  4. 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:

📦 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

Code