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

Multiple navigation meshes


So far, we have only looked at setting up a single navigation mesh in a scene, but navigation meshes are designed to be per character and not just one for the entire scene. We need multiple navigation meshes, but there is no field to directly set which navigation mesh to use for a character. Instead, RAIN uses a field called graph tags to correlate meshes with characters. To see how this works, let's add a second bridge to our scene that is larger and a second ship with double the scale. Here is an example setup:

This is a demo scene setup with an additional larger ship and larger bridge. Regenerating the mesh gives us a path over both bridges:

This is a navigation mesh with a smaller walkable radius that can cross both bridges.

Any character using this mesh will be able to go across either bridge. For our larger character to not be able to cross the smaller bridge, we need to generate another mesh with a smaller Walkable Radius. Create a second navigation mesh in...

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