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

Bug NavMeshPathStatus is not working

Discussion in 'Editor & General Support' started by mfatihbarut, Jul 24, 2022.

  1. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,059
    Hi,
    for the same navmesh, NavMeshPathStatus nearly always return pathcomplete (and rarely return pathpartial) but actually path is not complete and agent stuck in front of a navmesh obstacle.
    NavMeshPathStatus is not working.
     
  2. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,059
    Eventhough it was true and I still believe there is something to do with it (by Unity), I solved the problem with help of the message below.
    I have done 2 things
    1- Instead of making destination in Start I used an IEnumarator to constantly update destination (otherwise agent doesn't recognize and/or inform us the true situation as far as I see)
    2- I changed the destination with a point touching to the navmesh not over navmesh (in air) .
    https://www.reddit.com/r/Unity3D/comments/6dcwgl/navmeshagent_pathstatus_always_returns/