Couldn’t find this elsewhere so I apologize if I just missed other topics.
I would like a way to make multiple controllers follow the same path. What’s happening now is, I have a unit of 4 and I tell them to go to a spot. If because of relative path length some of the controllers take a different path the unit will split up. That is highly undesirable in my case. I’ve tried having all members follow the closest member, but that looks janky.
So, is there a suggested way to have multiple controllers follow the same path as a leader controller? This is using a path node graph.
If you have A* Pro you can use MultiTargetPath (multiple actor to one target) , set heuristicMode to Sequential , all your actors will move to shortest node point then they will follow the same path, I haven’t seen any function at free edition about that.
Ok, I’m finally getting back to implementing this. I understand how to request a MultiTargetPath result using seeker.StartMultiTargetPath. I have multiple agents using multiple start points and one end target point.
What I don’t understand is the following:
Should I only call this once for a group of agents? If so, how should I process the MultiTargetPath result when the result is returned to OnPathComplete?
If I call it once for every agent, aren’t I just determining multiple paths multiple times?
Multi target paths are not really the tool for this job.
It’s hard to say exactly how you should continue because I do not know the specifics of the game, but here is one suggestion.
A good way to do it I think would be to plan a single path for the whole group at regular intervals, and then for the individual units, you request a path to a point some distance ahead along that path.
See the attached image.
@Andrew_Algin not really. Even flow fields or dijkstra will not guarantee that they pass on the same side of an obstacle. The final result will be approximately the same as if A* had been used.