Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

NavMeshSurfaces and Agent Types

Discussion in 'AI & Navigation Previews' started by Mystiq, Mar 13, 2017.

  1. Mystiq

    Mystiq

    Joined:
    Aug 31, 2013
    Posts:
    8
    This new NavMesh work basically saved my ass. The game I'm working on now requires dynamic updates so to have that ability in 5.6 is a life-saver. I do have one concern, though.

    Correct me if I'm wrong. In the old NavMesh system, you bake a mesh and then each NavMeshAgent can specify its own size for collision purposes. NavMeshSurfaces can only be baked for one agent at a time so now if I want to have different agent sizes, I need one NavMeshSurface per agent type. For most games, you'll have a different size for almost every unit type. If I want to update the mesh real time, this update time now basically scales linearly with my model count. This strikes me as a performance problem as well as a bit of a logistics mess as I'll have to have one NavMeshSurface component on my terrain for each agent.
     
    daisySa and Sarrivin like this.
  2. Sarrivin

    Sarrivin

    Joined:
    Dec 18, 2015
    Posts:
    24
    Yes, I think NavMesh(surfaces) should be working for one, multiple or all agents.
    If Unity added a possibility to reuse NavMesh for all agents that would be a step in a really important direction.

    If we have many types of units, like maybe 10 or 40, I imagine now we would need to have 10 or 40 NavMeshes in same places. That's absurd.