Search Unity

NavMesh Agents Passing Through Each Other

Discussion in 'Navigation' started by Ben_Iyan, May 24, 2017.

  1. Ben_Iyan

    Ben_Iyan

    Joined:
    May 13, 2016
    Posts:
    204
    I know this is going to sound like a really noob question, but I cannot figure it out. I have two simple vehicles that I want to navigate to a point on the opposite side of an obstacle. The pathing works, but the two vehicles will overlap each other. Each vehicle has a NavMesh Agent, a Box Collider and a Rigid Body, but nothing stops the vehicles from passing through each other. Funny enough, the forum questions that I came across on this topic relate to actually allowing NavMesh Agents to pass through each other. All I want is what should (I think) be the default behaviour. Any help would be great.
     
  2. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    762
    How have you got your GameObject setup?

    They way I've got mine setup atm (while I'm learning) the agents don't go through each other but the models can. If you select scene view, highlight all your objects and watch them are the agents (green cylinders) going through each other too?
     
  3. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    with your navMeshAgents what is the obstacle avoidance radius?
    Are you using 5.6?
    Also, what is the agent size in the navigation panel?
     
  4. Ben_Iyan

    Ben_Iyan

    Joined:
    May 13, 2016
    Posts:
    204
    Sorry for the late reply, I've been out of town for a few days. Yes, I'm using 5.6, and based on your question about agent size, I decided to play with it and it now works as it should. It still seems counter-intuitive, because I thought that the agent size represented how much space the navmesh created around static obstacles. I very much appreciate both of your help is pointing out different areas where I can fault-find when I have errors
     
    Carwashh likes this.