Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

NavMesh not on ground?

Discussion in 'Navigation' started by Epic-Username, Aug 2, 2015.

  1. Epic-Username

    Epic-Username

    Joined:
    May 24, 2015
    Posts:
    325
    I created a NavMesh but its not touching ground its floating slightly above and the player walks on top of the NavMesh not on the ground, so it looks like he's floating. So how do i bake NavMesh on ground instead of slightly above.
     
  2. Radekk

    Radekk

    Joined:
    Dec 27, 2014
    Posts:
    6
    Use navmesh for agent path finding not for real position. Simply make raycast from agent position in Y axis -> hit ground mesh and set this new heigh for your character.
     
  3. Epic-Username

    Epic-Username

    Joined:
    May 24, 2015
    Posts:
    325
    How do i set the new height whats the script for it?
    and is there a way just to bake the navmesh lower instead of setting the objects navmesh agent height it seems like a much easier choose if i can.
     
    Last edited: Aug 4, 2015
    astracat111 likes this.