After adding the navigation mesh bounding volume in UE4 Unreal Engine, zombies cannot move and find players

UE4 series article directory

Preface

I recently used ue4 to do a first-person perspective shooting game and found a problem. After adding the navigation mesh boundary volume, zombies cannot move and find players. The picture below is a picture of the problem that occurred
insert image description here

1. Knowledge points used

1. Behavior tree: control and display the decision-making process of AI

insert image description here
insert image description here

2. Blackboard: It can be seen as creating some public variables in the behavior tree. The variable values ​​​​of the behavior tree blackboard can be modified externally to achieve the logic of modifying the state of the behavior tree. Through this example, let’s gain a deeper understanding of several
insert image description here
insert image description here
concepts in the first section:

The first concept: The behavior tree first performs the first task (avoiding the target), then performs the second task (finding food), and finally performs the roaming task, with the priority decreasing from left to right.

The second concept: There is a decorator on the first task, - corresponds to Is a Target Actor Set as the decorator. Only if it is True, then the task under this node can be executed. That is to say, when the behavior tree task can be executed Sometimes, it is necessary to judge whether the condition on the decorator is True

The third concept: decorators interrupt levels:

The following are the interruption conditions for the food-finding decorator, LowerPriority. If the roaming function is currently executed, then when the food-finding condition is met, the roaming function will be interrupted. Because LowerPriority is set, the task on the right can be interrupted.
insert image description here
insert image description here

Two, the cause of the problem

When I added the navigation mesh boundary volume, I found that the position was wrong. When I moved the NavMeshBoundVolume position downward to include zombies, then zombies could find the player and follow the player.
insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/aoxuestudy/article/details/132761857