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

How to get a path on the surface of a NavMesh

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

  1. Zenix

    Zenix

    Joined:
    Nov 9, 2009
    Posts:
    213
    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