Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

terrain data for nav mesh ?

Discussion in 'Navigation' started by Radekk, May 15, 2015.

  1. Radekk

    Radekk

    Joined:
    Dec 27, 2014
    Posts:
    9
    How can I use terrainData for navmesh ? is it possible ? or what is it (check attachment)?
     

    Attached Files:

    Last edited: May 15, 2015
  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
    I'm assuming that it's just a normal Unity terrain. So if you're using a terrain, you drag and drop it into that slot, and it will be used to generate the navmesh (instead of the normal calculation, which is probably less accurate).
     
  3. Jakob_Unity

    Jakob_Unity

    Joined:
    Dec 25, 2011
    Posts:
    269
    It's used for more accurate height lookup when placing agents and for height value (y-coordinate) in queries like navmesh raycast. It's enabled by the "Height Mesh" flag on bake settings - if terrain is present the navmesh stores a reference to the terrain - which is what you see in attached screenshot.

    For more info on heightmesh : http://docs.unity3d.com/Manual/nav-HeightMesh.html