Using navMesh stoppingDistance

In the prior challenge I used the navMesh’s stoppingDistance to figure out when to stop (as opposed to manually computing a distance). It turns out I was too clever by half as it turns out to be a liability here. Couldn’t find any great way to figure out if navMesh is actively trying to navigate without majorly changing other parts of the code.

At this point I realized some major refactoring is probably coming down the line soon so I did it the way Sam the instructor did it.

My current/temporary conclusion is that it’s probably better to calculate stopping distances yourself rather than use the built in stoppingDistance. This course definitely has me intrigued. I am glad I am taking it.

Privacy & Terms