I noticed there’s a lack of appropriate error handling in the Navigation classes… the first thing I noticed was that NavigationMesh::FindPath has absolutely no error checking of return values, and itself returns void - there is no triggering of a statechange event that could inform us that a pathfinding attempt has failed. The next thing I noticed was that FindNearestPoint does something almost as bad - if it fails to initialize a query object, or fails to locate nearest polygon, it simply returns the input point - no error event is sent, and no useful error appears to be stored anywhere.
All that effectively means that if I try to find a path to a target point that is completely outside the bounds of my navmesh, I am greeted with silence, rather than “path not found”… and if I ask for the closest point on the navmesh to my invalid target point, I am handed back the same invalid point!
Just wondering how others may have approached the lack of appropriate error handling when making invalid navmesh queries…