Book Image

Unity AI Programming Essentials

By : Curtis Bennett
Book Image

Unity AI Programming Essentials

By: Curtis Bennett

Overview of this book

Table of Contents (19 chapters)

Summary


We were able to use scripting and behavior trees in both React AI and RAIN to effectively create a wandering AI. Each AI had strengths and weaknesses, though the weaknesses were more of a preference.

Behavior tree editors were used in both RAIN and React, and both work in a similar fashion. In RAIN, you can start editing a tree from the menu, or from the editor itself. (It had the option to select the behavior directly in the editor.) With React, you can do this from the Project tab, by right-clicking and choosing to edit it. React had premade scripts that can do nearly all the actions that were needed, except that instead of selecting randomly from a list of targets with the tag, it would select a target expecting only one object with that tag. With RAIN, we made a custom action node to choose a location to go to.

Both React and RAIN AI are general AI systems that are useful for many different types of game situations, so neither were designed specifically to handle crowds. In the...