Creating navigation behavior
The first goal for our enemy will be to get it to navigate between points that we create on the map. To accomplish this, we'll need to create points on the map that the enemy will navigate to, and then we need to set up the behavior that will cause the enemy to move to each of the points in a cycle.
Setting up patrol points
Let's start by creating the path we want the AI to patrol. We will use a Sphere Trigger to represent a patrol point, since it generates overlap events and is hidden in the game. We need at least two patrol points on the level, since each instance of BP_EnemyCharacter
can navigate between two patrol points.
Follow these steps to create the patrol points:
- In the Level Editor, click the Create button located on the toolbar, and then click on Sphere Trigger. Place the Sphere Trigger anywhere on the floor:
- In the Details panel, rename...