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

AI getting stuck on navmesh obstacles

Discussion in 'Navigation' started by Hertzole, Nov 21, 2016.

  1. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    421
    Hello

    I've been working a bit with Unity's built-in AI system and I just experienced a bit of a problem. I've made my AI go towards a point and I tested to see what would happen if I blocked the path with navmesh obstacles and it worked for like 1 obstacle but when I made a row of them, they just started grinding on them.

    Here's a picture of it.


    There are 3 AI characters being stopped by these turrets. The AI is trying to reach the cube on the other side of the turrets. As you can see, there is walkable space around the turrets, so why are they not walking around them?
     
  2. Jakob_Unity

    Jakob_Unity

    Joined:
    Dec 25, 2011
    Posts:
    269
    You need to read this page :)
    https://docs.unity3d.com/Manual/class-NavMeshObstacle.html


     
  3. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    421