We already have a method of pathfinding, but it doesn’t always give us enough control to do what we want. Take this scenario for instance:
We would like the NPC to navigate to the entrance to the cave. This is the path we desire it to take:
However, with the current pathfinding system, this is the path the NPC will take:
The actual path it takes is not realistic – we want at least somewhat of a sense of realism in our AIs. There’s a certain amount of studs that an NPC is allowed to jump down in pathfinding, but sometimes maps aren’t always so clear cut. The path it takes in the last picture could be a rocky slope not meant to be used for travel but instead just for decoration, or it could be a path only meant for players to quickly a ccess parts of the map. Regardless of which scenario, we don’t want the NPC taking that path. In this case, our only solution is NavMesh or node map pathfinding. Node map pathfinding can’t hold a candle to NavMesh pathfinding, so NavMesh pathfinding would be the obvious choice. However, not only is such a system executed in Lua not as fast as it could be if executed from the C side of ROBLOX, not every developer can program a NavMesh pathfinding system himself/herself. Not all levels on ROBLOX are dynamic, and in that case NavMesh pathfinding may be preferred, or even a combination of the two where AIs use the existing pathfinding to navigate around short, dynamic obstacles in their current NavMesh path.
NavMesh, although tedious to set up for a level, is not difficult to use. Any developer that can use the existing pathfinding system can use a NavMesh pathfinding system. In order for us to have more control over our AI pathfinding and gain access to faster processing speed, ROBLOX should implement a NavMesh pathfinding system in tandem with the existing system at some point in time. They do not have to replace each other – the existing system is meant for dynamic maps, while NavMesh pathfinding is meant for precise control and predictable environments.