Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Unity 2022.2 is now available as the latest Tech release.
    Dismiss Notice
  3. We are making some changes to the DOTS forums.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    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