Navigation areas

In games with complex environments, we usually have some areas that are harder to traverse than others. For example, crossing a lake over the water is definitely harder than crossing it with a bridge. To simulate this, we want to make crossing the lake more costly than using a bridge. In this section, we will look at Navigation areas which are used as , a way to define different layers with different navigation cost values.

For this, we, build a scene, as shown in the following screenshot. There are three planes to represent two ground planes connected by a bridge-like structure, and a water plane between them. As you can see, crossing over the water plane is the most direct way to traverse the lake; however, passing through ...

Get Unity Artificial Intelligence Programming - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.