I make a isometric citybuilder.
I have a grid with settings 8 connections, it’s my world grid used for agent path and construction.
During construction, I can place buildings that follow a path ( ex : roads)
But roads need a path with 4 connections.
Agent can move in 8 directions however.
My grid is 1200*1200 so have 2 grids is a bit annoying.
You can however not set if the graph should use 4 or 8 connections per path. It is possible to introduce a switch for this relatively easily by modifying a few lines of the pathfinding core scripts. I can show you how if you want.
Ah, so you are planning a path that you the construct a road along?
Yes, the only way I found for have the shortest path and avoid buildings already build with traversalProvider.
Do you see problems to do like that ?
You can however not set if the graph should use 4 or 8 connections per path. It is possible to introduce a switch for this relatively easily by modifying a few lines of the pathfinding core scripts. I can show you how if you want.
No, I’m completely passed to 4 connections because I need 4 connections for LayerGridGraph :’( My agents will not have better path ( time perspective).
But now I have a little problem, when I set heuristic on Manhattan I have the same result that with euclidian.
Ah. The Manhattan heuristic uses the world X, Y and Z coordinates, so it behaves slightly differently on rotated graphs (It’s hard to make it use local coordinates in the general case unfortunately, especially without performance losses).
In your case you might be able to use a variant of the heuristic that does what you want.
If you open the Path.cs script you can replace these lines