Hi all.
I’m currently making an RTS game and am loving the Astar package.
However as noted in this thread: Seek path over multiple gridgraph's
You said it was possible to connect nodes of two graphs which I am doing like so:
for (int x = 0; x < Graph.width; x++)
{
var node = Graph.GetNode(x, 0) as GridNode;
if (NorthChunk != null)
{
var adjGraph = NorthChunk.Graph;
var adjNode = adjGraph.GetNode(x, adjGraph.Depth - 1) as GridNode;
var cost = (adjNode.position - node.position).costMagnitude;
node.AddConnection(adjNode, (uint)cost);
adjNode.AddConnection(node, (uint)cost);
}
}
Unfortunately it seems like the nodes are still not connected.
Do you have any advice for this?
Many thanks