- Home /
How do I get a navmesh agent to stop at the edge of a collider?
I have my project set to raycast my clicks onto the navmesh and order an object to move towards it using the normal navmesh agent functions for destination. But the behavior I want to emulate is that if an object is clicked in that order, I want it to move to the object but stop at the edge of it's collider, so it doesn't clip into it. Do I mix in regular collision with this, or should I be messing with stoppingdistance or something? Do I constantly check for collision in update? I thought this at first, since there's no way to guarantee that you'll impact the collider in such a way thats able to be foreseen at the moment of ordering the destination (If you had to move around a cylinder to get to a cube, you'll impact it differently than a simple raycast at the moment of ordering the desination might otherwise predict, etc)
A bit lost at the moment.
Thanks!
Your answer
Follow this Question
Related Questions
Navmesh sometimes falling through world when enabled 0 Answers
NPC's bump into eachother trying to reach a position 1 Answer
OnTriggerEnter not activating with NavMesh movement 2 Answers
How to have a navmeshagent not move rigidbodies in my world? 0 Answers
NavMesh on collision dectection activate,On collision activate navMesh 0 Answers