Search Unity

Disable agent movement as a result of collision with another agent

Discussion in 'Navigation' started by JRRReynolds, May 3, 2017.

  1. JRRReynolds

    JRRReynolds

    Joined:
    Oct 29, 2014
    Posts:
    192
    Is it possible to prevent a nav mesh agent from moving/sliding when it collides with another agent. I have tried .Stop()/isAgentStopped = true and also setting agent.velocity to (0,0,0) but this doesn't prevent movement when another agent collides with the stopped agent. Is there an absolute stop that can be done without disabling the agent?
     
  2. JRRReynolds

    JRRReynolds

    Joined:
    Oct 29, 2014
    Posts:
    192
    For anyone who has this problem, it has to do with obstacle avoidance - setting it to none fixes this issue