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!
↧