Smart Enemy AI | (Part 1: Behavior Trees) | Tutorial in Unreal Engine 5 (UE5)
Ali Elzoheiry · 7,040 words · 35 min read · EN-ORIG

Below is the complete, readable transcript of Smart Enemy AI | (Part 1: Behavior Trees) | Tutorial in Unreal Engine 5 (UE5) by Ali Elzoheiry on YouTube. Read the full text, copy any part you need, or generate a transcript for any video with our free tool.
[Music] Welcome everyone to this Unreal Engine 5 tutorial series on how to create smart enemy AI. Now, smart enemies are ones that react to their environment like this enemy here that searches for a wall to hide behind and then after a few seconds it comes out, attacks the player and hide again. Now, smart enemies can
also react to the player's actions, like this enemy that teleports if the player gets too close to it. And also, it even reacts to the player shooting an arrow at it and dodges away from the arrow, as you see here. Now, if I damage this enemy and bring its health low enough, it can even recognize its health is low
and react to its own internal state by healing. Now, to do all of this, we're going to be using a lot of AI tools that come with Unreal Engine. uh such as behavior trees that you see here to control the enemy's actions. Also the EQS or the environment query system uh which allows enemies to collect data
from their environment uh to position themselves in a smart way and make smart decisions about where they should be in the world and what's around them. We're also going to be set up a perception system. It allows enemy to perceive sounds and sights. uh like this enemy that's perceiving um the sound of my
arrow hitting the floor and it goes to investigate. Now, in part one, we're going to set up a basic behavior tree and an AI controller that will allow the enemy to chase the player around like you see here. And once the enemy reaches the player, it will try to attack, wait for a few seconds, and then repeat. So,
let's get started. So, I'm u starting off with the third person templates here. And I have um I'm also using Unreal Engine 5.2, which just came out at time of recording this video. And I have two small additions to this uh template. Uh which is uh this beautiful sword mesh that I just created
Transcribe another video
Paste any YouTube, Instagram or TikTok link to get a free transcript.