so I want an ai character to access the waypoints a around themselves and find the shortest route to reach their desired destination.

so I want an ai character to access the waypoints a around themselves and find the shortest route to reach their desired destination.

I recommend this youtube tutorial.
The full code is available in the video description and everything is explained step by step.