Game Development Reference
In-Depth Information
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 dan-
gerous 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 com-
ponent, 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. Set the ship's behavior tree to have a move node with the target,
as shown in the following screenshot:
Search WWH ::




Custom Search