I set up the grid graph, rotate the axis, applied the 2d physics, and selected the collision layer to make sure all the wall were non walkable.
However I need to use a Funnel modifier, as the default paths are too jerky, and the enemies speedis totally erratic. Funnel sorts this out perfectly, But when I try to make the enemy navigate a complicated path, the path generated is terrible.
See Images: (grid graph setting viewable if you click on the attached image below.)
I need to find a way to make funnel create better paths in the grid graph, and I’m hoping someone out there can help me and point me in the right direction.
The funnel modifier at the moment assumes the path is laid out in XZ space, so in XY space it might not generate the correct path. Sorry about that, it is something I have on my todo list.
You can try using the Simple Smooth Modifier or the Raycast modifier instead.
The raycast modifier will work on the XY plane, however it might not work for your specific case if you are using 2D physics. It currently only works with 3D Physics. Fortunately, it should be really easy to change. Basically you need to open up the script and change all calls to Physics.* to Physics2D.* and maybe change some parameters.
Or you can enable graph raycasting, that will perform raycasts against the graph instead of against the world colliders. That is a pro only feature though.
Hope the 2D enrichment roadmap is getting on track and we can enjoy more 2D functionality in the near future.
I created a RaycastModifier2D following your suggestions above and it works sort of.
It cuts corners too close and when it goes too far of coarse it 'can’t convert VectorPath to StrictVectorPath) which happens in modifiers.cs.