EnemyAIController
I want the main job of this class to set the values for the Blackboard asset, adjust the rotation of the enemy, and use the navigation mesh.
EnemyAIController.h
Just like all the other header files, we have to start with the includes. There is nothing fancy to include here, except the header file of the base class:
#include "AIController.h" #include "EnemyAIController.generated.h"
Also, define the class name, the inheritance, and the constructor. The three of them are made by default while creating the class, and probably, you don't have to change any of them:
UCLASS() class BELLZ_APIAEnemyAIController : publicAAIController { GENERATED_BODY() public: AEnemyAIController();
As we discussed earlier, the Blackboard asset is like a data holder asset and the AIController
will be setting its data; it is essential to create a blackboard component in order to use it as a reference for the required blackboard.
In the same way, will be creating a behavior tree component. Later, inside...