Navmesh Cutting for Specific Graphs

Hi there. I think this is simple, but for the life of me I can’t figure out how. I’ve read all the tutorials and documentation.

I have two graphs, one for small units like infantry and one for big units like tanks. I would like have dynamic physics obstacles, such as crates and barrels block the infantry graph but allow vehicles to simply drive through them.

I can’t figure out how to have a navmesh cut apply only to the infantry graph and not the vehicle graph. This seems like essential functionality so I have to assume it exists.

Any help would be greatly appreciated. Thank you kindly.

Bump! I really need to solve this. Thanks

Squeaky wheel gets the grease I suppose. If the answer is “the system can’t do this” then can we move the discussion into how to get to a place where it can? This feature is so core to a pathfinding program that it seems like I must be overlooking something obvious.

Hi

Sorry for the late answer, I had written a response, but apparently I hadn’t clicked send for some reason.

Right now it is not posssible to make a navmesh cut only apply to a specific graph I’m afraid.
You can probably add support for whatever filtering you want by modifying the NavmeshUpdates.cs script in the AddClipper method. That method is called once for each graph with a navmesh cut. I think if you just return there if it doesn’t match your filtering criteria then everything should work properly.

For other graph types this is usually solved with tags: https://arongranberg.com/astar/docs/tags.php, but they do not interact well with navmesh cutting.

Hey thanks for the response. I currently have your beta registry installed, which of course comes in the form of a package. How would I keep your updates and add these modifications if it’s inside the package context? To my understanding I cannot modify a package without first copying it out and losing all subsequent updates without a big headache merge process.

On that note, if it’s somewhat trivial to add this feature could this be integrated into the beta build using the already existing tags model? Seems like this is a feature many other people would want and a potentially strong selling point of the product over Unity’s component NavMesh flow.

That’s tricky unfortunately. Unity does have support for embedding packages in the project itself, but right now I think it’s only exposed via the scripting api and not via the package manager (not sure why).

It sounds like the easiest thing then would be to add this functionality into the beta. If it’s as you said and a couple return calls inside the AddClipper that queries the layer tag, is that perhaps something that can be implemented? I’m sure myself and many others would greatly appreciate the functionality. :slight_smile:

Fair enough :slight_smile:
I did some work this afternoon to get this in. It’s working now. It will be included in the next beta version update.

That’s excellent news, thanks so much. Really appreciate you taking the time to make that a reality. Looking forward to the next update!

1 Like