Creating a behavior tree
In this section, we will create a fully functional behavior tree for the agent we previously created. The steps we will follow are as follows:
- Creating the AI controller
- Creating the Blackboard
- Creating the behavior tree
Let’s start by creating a subclass of the AIController
class to control our dummy puppet.
Creating the AI controller
We will be now creating a class extending AIController
that will be used as a starting point for the behavior tree. To get started, open the Unreal Engine Editor and do the following steps:
- From the main menu, select Tools | New C++ Class.
- Click on the All Classes tab section and look for AIController.
Figure 8.6 – AI controller class creation
- Click the Next button.
- Name the class
BaseDummyAIController
and click the Create Class button.
Once the class files have been created and your IDE has been opened, look for the BaseDummyAIController...