O'Reilly logo

Mastering Unity Scripting by Alan Thorn

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

Baking a navigation mesh

The enemy to be created needs to walk intelligently around the level to find and chase the player as well as to find health-restore power-ups. The AI cannot simply walk in a straight line between any two points, as there might be intervening obstacles such as walls and other characters. The AI should instead navigate around these objects when they're encountered. To achieve this in the long term, a navigation mesh should be used. This is an invisible mesh asset that Unity generates automatically to approximate all walkable, horizontal surfaces in the level, that is, surfaces classified as a floor. The navigation mesh itself contains no AI. It does not make anything walk. The navigation mesh is rather a mathematical model ...

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