Hi there, i’m trying to do something similar, but i’d like to connect nodes from the Recast to closest nodes from the point graph
(Assuming i’ve only manually placed some Point graph nodes)
AstarPath.active.AddWorkItem((ctx) =>
{
pg.GetNodes((n) =>
{
GraphNode closest = rg.GetNearest((Vector3)n.position).node;
if ((closest.position - n.position).magnitude < 10000)
{
n.AddConnection(closest, 1);
closest.AddConnection(n, 1);
Debug.DrawLine((Vector3)n.position, (Vector3)closest.position, Color.magenta, 10f);
}
});
pg.ConnectNodes();
});
Is what i’m trying possible?
Also, if connections between different graph type is not possible, then maybe i can convert the recast nodes (and the connections) all into Point graph?