Search Unity

NavMesh not on ground?

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

  1. Epic-Username

    Epic-Username

    Joined:
    May 24, 2015
    Posts:
    339
    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:
    9
    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:
    339
    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.
  4. DubWellz

    DubWellz

    Joined:
    Aug 13, 2017
    Posts:
    4
    Go to the "Nav Mesh Agent" component in the player object it's self and change the "Base Offset" to .9 or whatever unfloats your boat lol.
     
    DanielRiches likes this.