Hello, I recently downloaded the Unity 5.6 beta and have been messing with the NavMesh surfaces. They are amazing btw!
One recommendation:
It would be super useful if when placing ‘NavMesh Obstacles’ we could have them carve specific NavMesh Surfaces instead of all of them.
Right now I want to create a NavMesh obstacle that one of my agents can go through, but the other agent can not.
I tried messing with the ‘IncludeLayers’ on the NavMesh surface and disabling the layer the obstacle was on, but it doesn’t seem to apply to NavMesh Obstacles, only objects that are stationary.
Also, if there’s already a way to do this. Then please let me know! I’ve looked around, but can’t find anything. Something similar to the ‘Nav Mesh Modifier’ ‘Affected Agents’ for NavMesh Obstacles would be perfect!
This is something I would very much like to see implemented as well. I’ve got a specific case where I need the navmesh surface the player controlled agent is navigating, to not have a hole carved by a specific navmesh obstacle, but currently the obstacle carves a hole in all navmesh surfaces it intersects.
I don’t think there’s a workaround for this either.
There’s no workaround for this one - it is noted.
I’d like to know what is preventing you from using NavMeshModifierVolume instead of carving obstacles ?
As christougher says, I need this for runtime carving. I have an obstacle that moves off of the navmesh and then back on periodically, that requires pathing to be adjusted for everything apart from the player agent.
Well not that run time baking won’t be feasible, they would work great for any baking scenario but I’m interested in carving with dynamic, moving obstacles that only affect certain agents. Can’t be rebaking the nav mesh every time something moves, especially on mobile. NavMeshModifiers also don’t affect LocalNavMeshBuilders that I can see either…
ok - so it’s a performance problem i guess.
The LocalNavMeshBuilder is supposed to be a simple example of the API, but it can be extended to support modifiers - e.g. similar to how it’s done in NavMeshSurface.
It’s really more about getting the same runtime functionality we have from the navmesh obstacle, just expanded to include agent types.
For my current games I have my nav meshes baked beforehand using NavMeshSurface. I have two agent types and I want certain moving obstacles to only affect one agent type. I’m targeting low end mobile (rhymes with kaizen coughcough) and higher.
@Jakob_Unity when you say we should be using ‘NavMeshModifierVolume’ instead of Nav Mesh Obstacles, does that mean Nav Mesh Obstacles are considered Legacy? And can the NavMeshModifierVolume do everything a Nav Mesh Obstacle can do? I’ll have to play around with them a little bit to learn more.
@aFeesh - they’re not considered legacy. The NavMeshModifierVolume is different in many aspects, one thing it can do, that carving cannot is to change the area type.
Jacob, I am facing large spikes when deploying to mobile device - overall, NavMeshModifierVolume is great, but it requires re-baking entire surface (or even multiple surfaces).
I really require the surface to span across half of my level, so it’s large. I also can’t use multiple surfaces joined with links.
If we compare to what the Obstacle does - it updates surface almost instantly and seems to only affect small region of topology. However, obstacle affects all the surfaces…
Well, NavMeshSurface does allow to specify bounds when baking, making the procedure quicker. But it kills everything around and only that region survives.
It would be a real save to have an option to bake a portion of surface (preserving its surrounding, previously-baked topology), similar to the traditional obstactle
@Jakob_Unity isn’t around anymore. As far as I can tell unity has stopped developing or caring about their navmesh. No one from unity participates in this forum. Regardless many of us have asked for runtime navmesh modifiers but Unity has had deaf ears since even before Jakob disappeared.
Deaf ears I’m afraid. @adriant care to help clarify the state of navmesh development at unity since you are listed as a navmesh dev? The silence is deafening. In the meanwhile I’ve used A star pathfinding project pro. Aron Granberg is great and has definitely NOT stopped development or support(unlike Unity?).
Thanks @christougher I am looking into A star pro - does it support various diameters for agents? So that the big monster won’t try to walk through a small door for smaller monsters
Yes, a similar question was just asked on his dedicated forum. You can do it with a similar approach to unity’s by having multiple graphs with different settings. There are also tags and penalties. He’s developing a navmesh modifier volume as well.