Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

NavMesh bstacle avoidance trouble

Discussion in 'Navigation' started by dred, Mar 26, 2015.

  1. dred

    dred

    Joined:
    Apr 8, 2013
    Posts:
    30
    Hello,

    I try to setting up my navmesh agent, and i have a problem, that even if a agent radius much more than way to target ( I mean by width ) my agent still go by this way. How I can prevent this?

    I attach few screenshots for better understanding what I mean:

    This is my settings
    NavMeshSettings2.png
    This is how it moving, as you can see, agent radius and agent much bigger than path
     

    Attached Files:

    Last edited: Mar 30, 2015
  2. Roni92

    Roni92

    Joined:
    Nov 29, 2013
    Posts:
    225
    wow, I was sure it takes into account actual agent size when calculating path...
     
  3. nostalgicbear

    nostalgicbear

    Joined:
    Mar 21, 2013
    Posts:
    99
    Is this using CalculatePath() ? Im having trouble with it too
     
  4. Jakob_Unity

    Jakob_Unity

    Joined:
    Dec 25, 2011
    Posts:
    269
    It's important to realize that there are two types of radii in play here

    . one determines the walkability/connectivity of the navmesh (in navmesh bake settings)
    . another determines the avoidance between agents (on navmesh component)

    see also:
    http://docs.unity3d.com/Manual/class-NavMeshAgent.html