How can I export the path green line?


#1

Hi everyone!
I’d like to export the green line of the path. Alternatively, I’d like to esport the points’ coordinates where the player move along the shortest path (that is the green line of the path). Is it possible?
Thank you everyone in advance for any help.


#2

Hi

Yes, you can access the vectorPath list on the Path object, it contains a list of coordinates for that green line.
See https://arongranberg.com/astar/docs/callingpathfinding.html


#3

Hi Aron,
thank you for your fast answer. Now I have another question: how could I have the total length of the path? I guess I can do it using “GetTotalLength()” function; is there an easy way to have this kind of information?
Thank you!


#4

Hi

Well… The GetTotalLength method is the easy way to get that information.