You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I have nodes already defined and I want the PathfindingService to use those nodes instead of the ones created by it. That is, use the nodes and find the path necessary to the desired end point. Is there a way to do this? Does there exist something that I missed or is that not within PathfindingService?
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Just my own I came up with, mainly concepts at the moment. They seem more complex than necessary, however, so I want to know first if I’m missing something before going through with it.
There are many nodes, though. It would have to be able to select one somehow. On a predefined grid, for example, with many nodes defined in all directions, looping through wouldn’t exactly work. I also need all of those nodes to exist as well.
Edit: I figured the PathfindingService would have that handled.
I would still need an algorithm to figure out which to group together, might as well create my own pathing then. So PathfindingService cannot use predefined nodes? Just the ones it creates for itself?
Edit: Or use a method to gather information around for those nodes and then connect them until it reaches the destination?
You might want to look in Dijakstra’s Algorithm or A* Algorithm to find the shortest path from a set of nodes from the start to finish. When I made my custom pathfinding (I had my own nodes) I used Dijakstra’s algorithm to find the shortest route from the start to destination. You might want to use A* though as it is generally quicker, depending on which heuristic you use.
Yea, I was looking into doing that but my circumstances may be different, assuming my method works. Definitely worth a read into Dijakstra’s algorithm, haven’t seen that one yet.