Hello,
I’m trying to get a nav mesh agent to stop once reaching an object.
I use SetDestination() with the target’s position, but the agent will try to reach this position exactly. I know there is a stopping distance but I use objects of different sizes for target. That means using Vector3.Distance is also not very practical.
Right now I use OnTriggerEnter to stop the player when reaching the target. While it’s worked so far, I think it could easily lead to issues later on.
Does anybody know a better way to handle stopping when reaching an object?