- Home /
Question by
drastick · Jun 07, 2012 at 07:37 PM ·
ainavmeshnavigation
Is there a built in notification when Nav Mesh Agents when destination is reached?
Other than doing a distance check each update, is there a way to check when a nav mesh agent has arrived at the destination goal?
Similarly, what about when a path becomes impassable, and their is no alternate route or we want to rethink the situation on that event?
Comment
Best Answer
Answer by drastick · Jun 18, 2012 at 06:04 AM
I've finally found what I was looking for! The following code is doing the trick, distance will be zero (or approch zero) on arrival.
if(navAgent.remainingDistance <= float.Epsilon)
{
//Arrived
}
Your answer
Follow this Question
Related Questions
Baking a nav mesh through a tunnel 3 Answers
Runtime Navmesh not working on mobile build 0 Answers
Make a flying enemy ? 0 Answers
Navmesh agent forward movement 1 Answer
How to do AI pathfinding on trees and other vertical surfaces? 0 Answers