Now that we have a patrol behavior established, we should make the enemy pose some threat to the player. To do so, we will give the enemy the ability to see the player and pursue them.
Making the AI chase the player
Giving the enemy sight with Pawn Sensing
To grant the enemy the ability to detect the player, we need to add a PawnSensing Component to EnemyController. To do this, open the EnemyController Blueprint and click on the Add Component button in the Components panel. Search for and add the PawnSensing Component. This Component gives us the ability to add a few additional event triggers to the EnemyController Event Graph. The one we are interested in now is called On See Pawn (PawnSensing), as shown here:
There is a...