Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

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:
    5,999
    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.