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.
To grant the enemy the ability to detect the player, we need to add a
PawnSensing component to the
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 OnSeePawn (PawnSensing), as shown here:
There is a second system that ...