Search Unity

Bug PathInvalid even when its not

Discussion in 'Navigation' started by zedz, Apr 9, 2021.

  1. zedz

    zedz

    Joined:
    Aug 31, 2013
    Posts:
    250
    Im getting NavMeshPathStatus.PathInvalid, when ever I use NavMesh.CalculatePath() and I want to go into the red encircled areas, they are slightly lower than the surrounding terrain at about 21 units high, but the thing is in other parts of the same terrain parts of it are much lower eg 8 units high and I have no issues walking there at all.
    Very very strange, any clues?
    Cheers zed

     
  2. zedz

    zedz

    Joined:
    Aug 31, 2013
    Posts:
    250
    OK after deciding not to waste more time trying to get this working, I decided to just raise the height of the terrain path a bit (red circle bottom right), but not touch the heights of hole (by the tree) i.e. keep it as a control to come back later and try and fix later, put a couple of fences thereso I know this is an issue to eventually fix. So I baked the navmesh again and voila now even the red encircled hole does not give NavMeshPathStatus.PathInvalid, either raising height of the path elsewhere or perhaps it was adding the fences that caused the navmesh to not display this bug. Still worrying, as there can be other places in the map where it gives NavMeshPathStatus.PathInvalid even though nothing is wrong


    EDIT: OK I can confirms its the adding of the fences that allows me to walk in the red encircled hole, if I disable the fences and rebake the navmesh, I cant walk there. How can I fix this issue?
     
    Last edited: Apr 9, 2021