Followers 0

# Optimal Navigation of a Navmesh

## 1 post in this topic

So an agent needs to navigate a navigation mesh, he wants to get from Source to Dest

[attachment=14242:Navmesh1.jpg]

A pathfinding algorithm is run which finds a list of navigation polygons the agent must visit

[attachment=14243:Navmesh2.jpg]

In this case A, B, C, D, G, and then finally H. In the above example the agent naively navigates to the center of the "entry" edge of each polygon, i.e. when the agent wants to navigate from A to B the entrance edge would the two vertices the polygons share summed and then divided by two to give the entry point A->B which the agent will seek to. What I want to do is smooth it so it looks like this:

[attachment=14244:Navmesh3.jpg]

So that it picks the best point at which to seek each entry point on the path. Now I know that probably isn't the best example because the mesh could be simplified, but it illustrates the point; I need a better way to choose how to navigate between polygon nodes. The "picking the middle" option also wouldn't work very well if two polygons share a large edge. I was wondering what elegant ways there were to achieve this?

Any help would be appreciated.

Cheers.

Edited by M_Johnson
1

## Create an account

Register a new account