Search Unity

Bug NavMeshAgent can not detect nav mesh on XY plane

Discussion in 'Navigation' started by rhys_vdw, Feb 23, 2023.

  1. rhys_vdw

    rhys_vdw

    Joined:
    Mar 9, 2012
    Posts:
    110
    I have just upgraded from 2022.1.22 to 2022.2.7.

    After having upgraded my
    NavMeshAgent
    can't find the nav mesh on the XY plane. The nav mesh agent gizmo is drawing on the horizontal plane. This was not an issue in the previous version we were using.

    I would appreciate any tips as to what I need to change to operate on the XY plane. This is blocking us from updating Unity.

    In the screenshot below both the agent and the mesh are at the same Z position.



    NOTE: I am generating the nav mesh through a third party package that uses
    NavMeshBuilder
    directly. This seems to be an issue with
    NavMeshAgent
    itself, which is part of Unity core, not the package. However, installing
    com.unity.ai.navigation
    1.1.1 does not resolve the issue.
     
  2. rhys_vdw

    rhys_vdw

    Joined:
    Mar 9, 2012
    Posts:
    110
    So I worked around this by stripping all usage of
    NavMeshAgent
    from the project and instead using
    NavMesh.CalculatePath
    directly. I was mainly using it for the async pathfinding handling, but I will write my own async manager for that if the cost becomes too high.

    Still a regression on Unity's end though AFAICT.