Support Forum

Question about A* Pathfinding Project and Isometric grids

I have a few questions about the a* pathfinding project. Below you’ll find a screenshot of my game

I’m using an isometric z as y tilemap with CellSize on each Grid gameobject set to x:1 y:0.577 and z:0.125. This results in a slight height gradation rather than a perfectly flat map (which is aligned layer wise using a common seed for similarity and x y offsets to produce a more natural look). I assume this zlevel offset breaks obstacle detection for the grid graph and I haven’t been able to detect obstacle yet on a given layer. The height changes also required looping thru a range of zlevels to find a given tile relative to mouse position since the zLevel can change per layer and I have 6 layers. some of the Zlevel ranges in these layers are 0-10 though and its pretty simple to loop thru in the World Tool Manager script that controls tile designation.

As to my question, I was wondering if its possible to stack isometric grid graphs and manually add node connections between the layers as the layers are dug into (programatically. ie an NPC digs into a tile, a connection is made if they dig a ramp, if not no connection is made)? This is my current proposed solution using the a* pathfinding project, as I’ve tried writing my own a* algorithm and couldn’t get it to find neighbour nodes. I think this is due to the cell offset but I’m not totally sure as I had a Zlevel search scheme similar to the World Tool Manager. If anyone has any better ideas or advice, please comment :slight_smile:

As well i’ve thought of using the layered grid graph but it doesn’t support 8 connections and my map needs that feature.

How much does it hold? Can be divided into two scenes for example.

Sorry for the late reply.

In the beta version the layered grid graph does support 8 connections. You might be interested in that.