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

Precision float errors and navmesh.

Discussion in 'Navigation' started by tawdry, Jan 11, 2019.

  1. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,356
    Hi
    So I was running into precision errors so decided to do that whole move everything to the origin point when player gets out to far unfortunately the baked navmesh does not move with it. I'm on unity 5.6.6 and read about something called navmesh surface would this work where the standard navigation bake does not? Is it more expensive to use longer to bake less accurate?

    Thx
     
  2. Yandalf

    Yandalf

    Joined:
    Feb 11, 2014
    Posts:
    491
    Honestly first of all you should definitely upgrade to 2018, the NavMesh systems have had quite some work done to them to now allow for localized realtime baking. This would definitely allow you to move everything back to the world center and rebake the most immediate sections.
     
  3. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,356
    Well 2018 is not an option in the foreseeable future as i would have to invest in a new computer and strapped for cash.What do youmean with rebake? doesn't the navmesh get moved along with the whole shift rebaking is not an option.
     
  4. Yandalf

    Yandalf

    Joined:
    Feb 11, 2014
    Posts:
    491
    Like you've seen for yourself, a navigation mesh cannot be moved as far as I'm aware once it's been baked. They HAVE to remain static and can at most be altered with carving obstacles, but moving an entire navmesh isn't possible.
    Because of this, navigation meshes need to be made all over again when you move your level geometry.
    I suggest that, instead of baking your NavMesh in the editor for the whole level, you dynamically bake a NavMesh around the player for a certain range and keep updating this with new bakes. In older Unity installations this is, indeed, pretty difficult, but the more recent installations using the NavMeshComponents make this a lot more doable and performant.
     
  5. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,356
    Hey Yandalf
    Had time to play around with the navmesh obstacle component that I downloaded from unity's github repository and no need to rebake it moves with the mesh and better stilll can be baked seperately without effecting pre existing navmesh's.Why it isn't automatically included in the main download is beyond me.
    Thx.