There are different ways to represent nodes in a navigation mesh. It's either along triangle centroid, along triangle vertices or along edge midpoints.

As I understand if you choose triangle centroid or edge midpoints as nodes, the path isn't going to be optimal, but you can use a funnel algorithm to optimize it.

If you choose triangle vertices as nodes however, I understand you can find the more optimal path from get-go. But you will get a "wall hugging" issue. Which you can solve by using some algorithm I unfortunately forgot the name of.

What is the preferred or most optimal option?


1 Answer 1


I don't think there is any Generic "Optimal" way to do this. It mostly depends on your type of game.

For instance, in a RTS, you probably want to go with the center of a triangle rather than edges so that you can have lots of units walking over the Map. In a FPS you might want to use edges to get a better and more complex node mesh. So that they AI might be able to flank you etc.

Could you tell us more about the type of project you are making? This way i guess it would be easier to help you find the more optimal solution for your needs.

Good luck!

  • \$\begingroup\$ It's an FPS game. When using edges do you only use the edges that are shared between triangles as nodes? And then I guess you use the same edges for path straightening with funnel algorithm? Also why not use triangle vertices as nodes, this way you can skip running funnel algorithm. Is it because more nodes are required? \$\endgroup\$
    – user134288
    Dec 6, 2019 at 15:15

You must log in to answer this question.