AI Sense
Let's start by bringing up Unreal Engine 4 and open our New Project window. Then, perform the following steps:
First, name our new project
AI Sense
and hit create project.After it finishes loading, we want to start by creating a new AIController that will be responsible for sending our AI the appropriate instructions.
Let's navigate to the Blueprint folder and create a new AIController class, naming it
EnemyPatrol
.Now, to assign
EnemyPatrol
, we need to place a pawn into the world then assign the controller to it.After placing the pawn, click on the Details tab within the editor. Next, we want to search for AI Controller. By default, it is the parent class AI Controller, but we want this to be
EnemyPatrol
:Next, we will create a new PlayerController named
PlayerSense
.Then, we need to introduce the AI Perception component to those who we want to be seen by or to see. Let's open the
PlayerSense
controller first and then add the necessary components.