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

NavMeshAgent y offset

Discussion in 'Navigation' started by zIyaGtVm, Oct 31, 2018.

  1. zIyaGtVm

    zIyaGtVm

    Joined:
    Dec 27, 2017
    Posts:
    131
    Hi I'm wondering why player with navmeshagent will automatically move upwards about 0.08 unit on y-axis as soon as playmode starts. It seems that navmesh surface has a height?
    How can I make sure Player's y always 0.0f?
    y.png
     
  2. Yandalf

    Yandalf

    Joined:
    Feb 11, 2014
    Posts:
    491
    That's a setting in your NavMesh Agent, called Base Offset. If you set this to 0 your pivot point will be right on the navmesh.
     
    AlxQ14 likes this.
  3. zIyaGtVm

    zIyaGtVm

    Joined:
    Dec 27, 2017
    Posts:
    131
    Thanks I see this property, but maybe there's something else causes this y-offset? Because it still move a bit after I set it to 0.
    GIF.gif

    EDIT:
    I found it's because height mesh is not supported on NavMeshSurface now.
     
    Last edited: Nov 2, 2018