What I set wrong?

Hi Aron,

I am still wondering, how to set astar pro correctly… We are using recast graph as it is using terrain and also buildings so we need nonplanar multileveled pathfinding. It is 1kmx1km terrain in real-world scale so pretty common size… And we are wondering why pathfinding choose such shaped way? Photo is takend from below the ground as from above it is less visible due to terrain shader. Also that agent have Funnel And Radius offset modifiers, which are turned off on the second image.

P.S. the terrain is almost flat at this part and I did not get yet to penalties… so they should be none.
What shall I do to walk more straight toward target? Thanks in advance :slight_smile:


Due to how pathfinding on navmesh based graphs work the path is not always optimal (it figures out the optimal non-post-processed path. see https://arongranberg.com/astar/docs/getstarted2.html#navmeshnotes for a bit more info).

There are ways you can combat this however:

  1. The RichAI movement script has a built-in additional simplification post-processing code for the path that often helps a lot in these cases. In the current beta version this is also supported for the FunnelModifier component (if you set the Quality setting to High).
  2. Using a different tile size can often help. In your case I’d try doubling it.
1 Like