Game Development Reference
In-Depth Information
Just like with the pathfinding demos, first we need to set up the behavior tree to
have a basic waypoint route follow system. Under the root node in the behavior tree,
we need to create a
waypointpatrol
node and a
move
node, with the
waypoint-
patrol
node set to use our waypoint route and setting its move variable to the
move
node. Do this by right-clicking on the root node and navigating to
Create
|
Actions
|
Choose Patrol Waypoints
. Then, right-click on the new
waypointpatrol
node and
navigate to
Create
|
Actions
|
Move
. Then, set the
waypointpatrol
waypoint to
Patrol Route
(with quotes), the
Move Target Variable
field to move the target, and
the
Repeat
type to
Forever
. The behavior tree should look like the following: