A* Pathfinding Project

Displaying the route


#1

Hi.
I am trying to make a car navigation system for my game. I know that I can see the route using Gizmos for Debugging. But I need to display the route in Run time. Any ideas?

(Example)
13679138


#2

Hey,

If you are using the seeker component you can use the GetCurrentPath function ( https://arongranberg.com/astar/docs/old/class_pathfinding_1_1_seeker.php#a25305772b7c87c77ce718ea8dbbc2381 ) in the path you’ll find a list with all corners. If you are manually constructing your path you should already have access to the path.

You could feed all these data points into a Line Renderer to create the effect you’re looking for.


#3

Thanks for reply! I’ll try that.