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

Culling areas


Being able to set up areas as walkable or not is an important part of creating a level. To demo this, let's divide the level into two parts and create a bridge between the two. Take our demo and duplicate the floor and pull it down. Then transform one of the walls to a bridge. Then, add two other pieces of geometry to mark areas that are dangerous to walk on, like lava.

Here is an example setup:

This is a basic scene with a bridge to cross.

If you recreate the navigation mesh now, all the geometry will be covered and the bridge won't be recognized. To fix this, you can create a new tag called Lava and tag the geometry under the bridge with it. Then, in the navigation meshes' RAIN component, add Lava to the unwalkable tags. If you then regenerate the mesh, only the bridge is walkable. This is a screenshot of a navigation mesh with polygons that are under the bridge culled out:

To see this in action, create a new ship and add a target to the scene on different sizes of the bridge...

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