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. Dismiss Notice

How do I make the navemesh surface stay on the actual surface.

Discussion in 'Navigation' started by zastroph, Aug 12, 2020.

  1. zastroph

    zastroph

    Joined:
    Aug 13, 2017
    Posts:
    7
    How do I make the navemesh surface stay on the actual surface. Every time I rebuild it via script, it doubles the distance between the navmesh and the actual surface. This very quickly makes to surface unusable.

    The navmesh surface component is on an empty game object, that contains the dungeon rooms which have the floor sections.

    I use Dungen from the asset store, to build the dungeon. This automatically destroys all the dungeon parts, and then builds a new dungeon.

    I use: BuildNavMesh(); to rebuild it. Is there some thing else I need to do as well. Such as deleting the current navmesh etc.

    I did read that turning on the height mesh would fix it, but it makes no difference other than to slow down the starting of the game!
     
  2. zastroph

    zastroph

    Joined:
    Aug 13, 2017
    Posts:
    7
    I seem to have solved this problem by setting the Collect Objects to Children.