Is there a function for calculating the total path length of pathfinding distance? All the AIs seem to hallucinate a “getPathfindingDistance” function that doesn’t seem to exist. The game idea is that travel would use up energy, and to navigate you would click on a point and it would tell you the distance to that point, taking into account navigating around obstacles before you committed to moving to that point. Is there a better way to do this than send out a dummy pathfinder, calculate all its nodes then do distance measurements between each node? (If there isn’t a better way, is there an example out there of summing up all the distances?)
Cheers.
1 Like
As you said, the only method I’m aware of is to use a dummy path. One way uses basically the same technique as used to draw a path. For testing I added a text object and shape painter, I unchecked both relative and clear for the shape painter. The Player has the pathfinder. There are 2 variables, Distance and Node.
1 Like
Thanks Keith. That was super helpful.
1 Like