Game Development Reference
In-Depth Information
patrol route will set the variable to the next location in the path. We use this
in the Move node.
15. Select the
move
node, and in the properties, set the
Move Target
to
Nex-
tWayPoint
, the variable that is being set by the patrol route we just con-
figured. And set the
Move Speed
to a number, such as 3. This is how fast
the character will move.
16. Now that we have created the behavior tree, we need to set the Character AI
to use it. Select the AI object under the player object in the Hierarchy panel.
On the Mind icon, for the
Behavior Tree Asset
, set it to
FollowGreenRoad
.
This can be found by navigating to
Project
|
AI
|
Behavior Trees
, or from
the selector in the
Inspector
panel, choose the
Assets
tab, and it should be
right on top.
The demo should be able to run now. The character will move around the block and
walk to the last waypoint in the path.