Hello
Is it possible to check the distance between two points on a graph without trying to move an object on a path? This question seems to have been asked here - but wasn’t answered: Distance from AI to Point
Thanks
Hello
Is it possible to check the distance between two points on a graph without trying to move an object on a path? This question seems to have been asked here - but wasn’t answered: Distance from AI to Point
Thanks
Hi
If it’s just a grid distance you can do:
ABPath path = ABPath.Construct(startPoint, endPoint, null);
AstarPath.StartPath(path);
path.BlockUntilcalculated();
Debug.Log("Distance was " + path.GetTotalLength() + " and passed through " + path.path.Count + " nodes");
If you are using modifiers such as the funnel modifier with your Seeker then you can call seeker.PostProcess(path) right after it has been calculated to make the path use the modifiers too.