- Home /
Question by
matthewse19 · Nov 06, 2015 at 01:44 PM ·
navmeshagentnavigationobstacle
Make a Navmeshagent an obstacle
So I've made a simple NavMeshAgent that follows the player, and then I repeatedly instantiate the same NavMeshAgent. The problem is I need to make the NavMeshAgents consider the other NavMeshAgents as obstacles. When I do attach an obstacle component to a NavMeshAgent it just freaks out and teleports around.
Comment
Answer by graciasluigi · Nov 06, 2015 at 03:05 PM
This can cause bugs, you are probably getting some warnings about this, right? Try messing around with NavMeshAgent.avoidancePriority
http://docs.unity3d.com/ScriptReference/NavMeshAgent-avoidancePriority.html
Another option, would be to make this avoidance behavior by yourself.
Your answer