Is it possible to do a movable area preview on a RecastMesh?

Basically what the Flood Path and Constant Path demos were doing on the grid graph, but on a Navmesh/Recast graph?

If you’ve done something similar I’d love to see it!

do you mean in terms of gizmo and information display? :slight_smile:

Yeah, I’m not sure how it would even work honestly, I’m still learning and really suck at this. But similar to this demo the way it shades an area on the grid based on a distance, but somehow do it on a navmesh instead of a grid. The use case would be a turn based strategy where your movement range is limited by action points, it’d just show a shaded blob surrounding your character.

Hi

It is technically possible to use both the FloodPath and ConstantPath on a recast graph, but since the pathfinding is done on a node-by-node basis, you’ll most likely not end up with an aesthetically pleasing result, since triangles on recast graphs can be quite large.
I’d recommend sticking to a grid graph for this kind of visualization.

To add onto this, I had an idea, that could still use Recast graphs: What if you created a grid yourself, be it with mesh generation, a drawing asset like ALINE, just a prefab, etc, and had each square in the grid check to see if it was reachable from the destination of the agent, hiding the ones that aren’t reachable?

The custom grid idea might even be useful for this, where you could change individual squares to your liking- but I’m just throwing out ideas, a Grid Graph + FloodPath is less… convoluted, haha.