Recast Navigation Target Issue

Should the target location for a recast graph always be the position on the nav mesh itself? I have this scenario:

image

Where the approximation from recast is such that there is nearly a 1 meter height difference between the recast graph and the terrain. The RichAI cannot get there due to this height difference. I am using a tile size of 32 in a world that’s 400x400 in unity space.

Do i have to take my world position and find the nearest point on the recast graph (not node)?

Thanks,

Hi Aron,

Any advice on this one? I’m still seeing it a lot. If it’s not possible to make the character nav to that location is there a way of being able to tell if it’s possible to begin with?

Thanks,

I may have sort off fixed this but arrived at another issue. For the above scenario I was setting the navigation target to a point on the terrain and that was too far below the nav mesh. Now i get the nearest point on the nav mesh and set that as the nav location. This seems to fix navving to locations where there is a big discrepancy between the nav mesh and my terrain.

However i’ve now hit this situation where the ai gets extremely close to the nav location when the location is right on the edge of the nav mesh but never reaches the destination:

I’m not quite sure how to handle this one. Any suggestions?

Thanks

Figured out how i can force this. If i have flat terrain and move it down 3 units after the nav mesh has rebuilt they can’t nav anywhere because he can’t get close enough to the target on the nav mesh. This makes sense i suppose but i don’t know how you’re supposed to handle this when it happens naturally due to the poor approximation of the nav mesh.

image