Creating a basic behavior tree and black-board!
Ok, now that we have a rough idea of the workings of a behavior tree, let's work with one directly so we can solidify that knowledge and understanding. The purpose of this tree is to provide AI behavior to our boss character. We can start by simply getting our boss to identify the player as a target and track to the player. If the player runs far away from the boss or is occluded by blocking geometry, the AI will begin to path between a home location and last location the player was seen.
Setting up the blackboard
Start by creating a new behavior tree asset by right-clicking in the Content browser and selecting Behavior Tree from the Artificial Intelligence section of the provided list, as follows:
Call this new behavior tree BossBT
. Then create a new Blackboard asset from the same category. Call this BossBB
. We will start by adding the blackboard keys we are going to be utilizing in BossBT
. Open the BossBB
asset we just created and you will be...