Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    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:
    211
    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
unityunity