What is the 2D (sprites) equivalent of Navmesh Cutting?

Recast is supposed to work in 2D, but it’s giving me undesired results by projecting paths ONLY onto the objects it’s supposed to avoid. I can’t find any documentation on implementing it in with sprites, if I can find this it would solve my problem. I think it has something to do with a mesh filter.

I have many physics objects that move often, and using a gridGraph might be better for performance. Recasting an entire whole grid every second is to expensive. If there was a way to recast slowly it might work, but not sure if that’s an option.

Hi

Recast can be rotated to work in the 2D plane, however it does not (currently) work with 2D sprites I’m afraid.
I would recommend using a grid graph if you are making a 2D game, especially since you mention moving objects a lot.

You can use the DynamicGridObstacle component and attach it to the objects that are moving. It will automatically recalculate the graph around the objects when they move.

1 Like

Thank you, this was the answer I needed! :grinning:

1 Like