Search Unity

Needed: Update NavMesh on position!

Discussion in 'Navigation' started by netvortex_dc, Jan 9, 2015.

  1. netvortex_dc

    netvortex_dc

    Joined:
    Jan 13, 2014
    Posts:
    126
    Hello,
    in our game players can build things in the game-world and walk on it. Using the Unity NavMesh is not a viable option for us because you cannot update the NavMesh after it has been baked. Using Obstacles on those GameObjects isn't an option either because the NPC isnt able to reach the player on the structure.

    What this engine needs is the ability to update the NavMesh during runtime. A command e.g. NavMesh.Update(worldposition, radius, millisecondsPerUpdate) that will update the NavMesh in that area.

    I see 3rd Party solutions already implemented similar approaches. At this point this engine doesn't have a pathing solution that can handle a 5000x5000 terrains with trees and dynamic objects.
     
  2. CodeElemental

    CodeElemental

    Joined:
    Feb 6, 2014
    Posts:
    15
    One approach would be to dynamically change the layer of specific portions of the navmesh (ex. the navmesh under destroyable trucks /buildings or something ).
    Taken into consideration the 'walkable' navmesh layers the agents can move on you can dynamically change which part of the level is accessible.
    I do not know the specifics of your world however and the performance impact of such actions.
     
  3. woreirsis

    woreirsis

    Joined:
    Jan 31, 2015
    Posts:
    1
    Taken into consideration the 'walkable' navmesh layers the agents can move on you can dynamically change which part of the level is accessible.


    _____________________
    online
     
    Last edited: Dec 8, 2015
  4. netvortex_dc

    netvortex_dc

    Joined:
    Jan 13, 2014
    Posts:
    126
    I dumped the Unity NavMesh and use Aron Granberg's Astar Asset. Works super fast with more than 500 NPCs in the scene and can update the NavMesh on the fly with any object you are placing...