Okay, so I've been working on this issue for like 2 weeks, I finally decided to just post a question about it. I've looked at
this page and read the documentation on custom pathfinding already, but I really, really don't get how it works! I know I'm supposed to write a script with a GetPointsArray function, and I know that the GetPointsArray function "takes two Vector3s as inputs and returns a Vector3 array that describes the path," but I still don't get how I'm supposed to use it. What kind of code am I supposed to write
inside of the GetPointsArray function in order to get the custom pathfinding to work? Do I just assign the two vector3 variables in the function or do I have to do more (I'm assuming it's the second one). I hope somebody knows what I mean and can help me out with implementing the Quick Path asset into AC. Thank you so much for any help that's offered, and if my question makes absolutely no sense at all, then I apologize in advance...
P.S. I do know how to get the script to be compatible with the AC's pathfinding engine, with the enums and everything, so I don't need any explanation of that. I just need to know what has to happen in the GetPointsArray function. Thanks again for any help!
Comments
The base function GetPointsArray is designed to be as simple as possible - no matter what algorithm you go with, it's always going to need a start position and end position as inputs, and output an array of points.
If you're looking to implement a specific asset (which from your title, I'm guessing is the case), I'd suggest contacting the author.
I use a node based pathfinding with AC and the interface just need the GetPointsArray implemented, returning a Vector3 array of your A* calculated result path, from the start point, to the end point.
All pathfinding needed from AC will call your GetPointsArray implementation.