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.
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.
Taken into consideration the ‘walkable’ navmesh layers the agents can move on you can dynamically change which part of the level is accessible.
online
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…