I was able to successfully use grid graph with my 2D project, however the paths are a bit choppy (even with some smoothing) or passing through obstacles (with too much smoothing).
I tried using RecastGraph but I’m having some trouble scanning/generating the graph. I’m using 2D physics, but couldn’t find any settings for that on the RecastGraph. I tried checking “Rasterize Colliders” but that didn’t seem to help either.
Yeah, recast graphs only work for the XZ plane. When I designed it I did not even consider that Unity might add 2D only in the XY plane (it wasn’t even on Unity’s roadmap back then), so unfortunately there is a lot of code that assumes the XZ plane.
Grid graphs and point graphs work better.
How exactly do you want to improve the path smoothing?
There are multiple definitions of ‘better path smoothing’, so could you describe a bit more what you want to get out of it?
Well, it’s either jittery/zig-zag-y if I don’t smooth it enough, and if I smooth it too much it cuts into the obstactles it should be avoiding (cut corners is unchecked)
For smoothing I’m using the SimpleSmoothModifier with the Simple option. I tried all the other ones, but this one worked best for me (except for the problem described above)
If you just want a more “organic” movement, you could also try writing your own modifier that just offsets each node a little by a random amount inside a circle. If you want to further help avoiding corners, you can check for neighbours and only offset in direction of the neighbours.
Or write your own graph that applies the offset during rasterization already (so it can check if the offset positions are still collision-free)