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

Using senses with RAIN


For this demo, we will use RAIN 2.14 and have a ship that patrols a path, looks for pieces of gold, and picks them up. To start, we'll use a setup similar to that of the demo in Chapter 3, Behavior Trees. You can start from there or recreate it; we just need a ship, a wall, a path, with the ground being a little larger, and the objects spread out a little.

Note

When changing the base geometry of your game levels, you need to regenerate the navigation mesh. This is done by selecting the Navigation Mesh object in your scene and clicking on the Generate NavMesh button.

Here is our basic setup. The following image shows the starting point of our sensor demo:

We also just need the behavior tree for the ship to only patrol the path. Set up this behavior like we did in Chapter 2, Patrolling, or if you are using the behavior tree demo, delete the timer node functionality. The new behavior tree should look like the following screenshot:

This will be the starting point of the behavior...

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