3D Navigation (navmesh)

Unity has a built in navigational mesh which plots paths for your Ai agents, navigating through 3D geometry. A limitation of this built in navmesh (for short) is that it is two dimensional so it limits our Ai agents to moving on two axis.

I wanted to have a solution where flying Ai could navigate obstacles so I built my own solution from scratch. I created a 3D grid where each cell can check if its obstructed and then I use A* algorithm to calculate the shortest path between unobstructed cells.

This process can be visualized in the examples on this page.