Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. 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