Search Unity

Accessing NavMeshAgent update frequency

Discussion in 'Navigation' started by chanfort, Aug 19, 2015.

  1. chanfort

    chanfort

    Joined:
    Dec 15, 2013
    Posts:
    641
    Unity 5 brought some nice improvements in NavMesh, as agents are no longer jiggling in crowded areas, as it was in 4.x. However, it came at the cost of more CPU power needed. For example in 4.x I was able to use more than 2k-3k agents at reasonable FPS. In 5.x reasonable FPS are when in a scene are less than 1k agents only.

    Dynamically changing Navigation from v5.4 would look very impressive, but I am afraid to think what CPU power it may assume when running on runtime. I think it could be quite good to add a parameter, which would allow to set how frequently to update agents (and maybe bake API as well from v5.4). This would give more control and would allow to increase number of usable agents in the scene. It should also sort out unnecessary culling for invisible/more distant agents from camera and use low update frequencies for them instead.
     
  2. Lahzar

    Lahzar

    Joined:
    May 6, 2013
    Posts:
    87
    While this is a good idea, there are more instant options available. I don't know if you can do this in unity currently. But if you can't, it will most likely stay that way for a while. Rendering seems to be the big focus for the unity team atm, so adding these kinds of relatively small changes shouldn't be prioritized. Why not? Well, the asset store. There are tons of stuff that do this already. Just take a look.

    Im just saying that if you really need this control, and you want thousands of agents, you should get a better pathfinding system of the asset store. I heavily recommend the A* Project by Aron Granberg! Even the free version is amazing!

    Anyways, it is much more efficient than the unity builtin navmesh, it allows easy update frequencies for agents and the navmesh etc. Are the any reasons at all for your project to stick with the unity builtin navmesh?