Creating an AI agent
As the first step in testing the pathfinding system, we are going to create an agent whose sole aim is to reach a target actor inside the level; it won’t be anything fancy, just an actor that will be able to reach a target point in the level.
Let’s start by creating a new folder inside Content Drawer and calling it Blueprints
. Double-click on the newly created folder to open it and perform the following steps:
- Right-click on Content Drawer and, from the menu that opens, select Blueprint Class.
- From the Pick Parent Class window that will open, select Character, as depicted in Figure 4.2:
Figure 4.2 – Character creation
- Name the newly created asset BP_NavMeshAgent.
- Double-click on it to open it.
As you probably already know, the Character
class refers to a specific type of pawn that is designed to represent players or AI agents in a vertically oriented manner, allowing them to walk...