Search Unity

Navmeshagent walking too close to a wall

Discussion in 'Navigation' started by ItsaMeTuni, Mar 9, 2016.

  1. ItsaMeTuni

    ItsaMeTuni

    Joined:
    Jan 19, 2015
    Posts:
    44
    My problem is, imagine a navmeshagent in a corridor but it isnt walking in the middle of the corridor, it is walking on the side of it, close to the wall. It is just strange. I know that this happens because of the navmesh nodes, but is there any way to make the navmeshagent walk in the middle of the corridor?

    Thanks in advance! :)
     
  2. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,327
    It tends to cut corners and we have little control over path behavior. You can increase agent radius and rebake, that'll make the corridor navmesh narrower and the agent might better avoid the walls.