Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

How to get a path on the surface of a NavMesh

Discussion in 'AI & Navigation Previews' started by Zenix, Feb 10, 2017.

  1. Zenix


    Nov 9, 2009
    I'm using NavMesh.CalculatePath to get a path and would now like to draw a visualisation of it. The issue is that the path often dips quite severely below the NavMesh, so you can't see the visualisation.

    Is there away to ensure the path follows the NavMesh?

    I could of course use raycasts or some other method to find the ground level at each point, but this seems pretty hacky and I'm hoping there's a nicer way.
    Last edited: Feb 12, 2017