O'Reilly logo

Learning Game AI Programming with Lua by David Young

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a navigation mesh

Creating a navmesh utilizes all the fixed geometry within the sandbox. The C++ side of the navmesh generation takes care of representing the sandbox to the Recast library. Any SandboxObject instance with a mass of zero, which is a fixed object, will be used for the navmesh generation.

Note

Planes are excluded from navmesh generation, so make sure that the ground is represented by a mesh or box.

We see a navigation mesh in the following screenshot:

Creating a navigation mesh

Configuring navigation meshes

Generating a navmesh requires some basic information about the type of agents that will use pathfinding with the mesh. By default, the sandbox will autopopulate ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required