Reader small image

You're reading from  Unity AI Programming Essentials

Product typeBook
Published inDec 2014
Publisher
ISBN-139781783553556
Edition1st Edition
Tools
Right arrow
Author (1)
Curtis Bennett
Curtis Bennett
author image
Curtis Bennett

Curtis Bennett has been a developer in the games and computer graphics industry for several years. He has worked on developing immersive virtual environments, published research in visual simulation, taught college courses in game development, and worked for various game studios, and he was also an engineer on early versions of the RAIN AI plugin for Unity. Currently, he is the Technical Director for Creative Services at Ideum, which focuses on creating interactive media projects.
Read more about Curtis Bennett

Right arrow

RAIN AI


RAIN has this section put together pretty well. In reality, we only have one small section to change from the pathfinding demo, especially because the pathfinding demo had actually turned off the patrol feature.

Start with the project for RAIN AI from Chapter 1, Pathfinding. From the menu, navigate to RAIN | Behavior Tree Editor. From the editor, select FollowGreenRoad. Under Sequence is a patrol route node called waypointpatrol; select it. Finally, we have a property called Loop Type. Presently, it is on One Way, which stops at the last waypoint. You can switch it to Ping Pong or Loop, as shown in the following screenshot:

Ping Pong bounces you back and forth on the path, while Loop connects the last waypoint to the first to start over.

This works when creating a typical patrolling behavior, where a character loops along a path. However, what if we want to have a character patrol an area by walking around back and forth to different points without always following the same route?...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Unity AI Programming Essentials
Published in: Dec 2014Publisher: ISBN-13: 9781783553556

Author (1)

author image
Curtis Bennett

Curtis Bennett has been a developer in the games and computer graphics industry for several years. He has worked on developing immersive virtual environments, published research in visual simulation, taught college courses in game development, and worked for various game studios, and he was also an engineer on early versions of the RAIN AI plugin for Unity. Currently, he is the Technical Director for Creative Services at Ideum, which focuses on creating interactive media projects.
Read more about Curtis Bennett