Get Path Length - Inconsistent Results

Hi Nemecys,

In general GetPathLenght returns an approximation of path length rather actual length. It’s an optimization, this function is skipping one expensive step of pathfinding to save some CPU cycles. Having said that maybe this behavior should be optional…

One more thing here. I’ve looked at the code and it seems there’s a bug in path length calculation when start and end point are on the same navmesh polygon. In such a case the function will return 0 while it should return distance between start and end points. Will fix it. Thanks for reporting it!

Cheers,

–mieszko