Multi-End Path? / Append path?

This is what I want.

On left click, the player’s path is cleared, recalculated, and the player goes there.

On shift-left click, calculate a path from the last path’s end point to the selected location, and append that to the current path.

I thought multitargetpath would do this, but I guess that’s a different thing? Do I just need to put this in the onpathcomplete callback?

Is there like a path.append function or something that I just haven’t found? Seems like this would be a really common functionality

Hi

I would not recommend that you calculate all paths at once. Instead whenever the agent reaches one destination, you can check if there are any queued destinations. That will more gracefully handle the agent getting pushed away from its path, or some obstacle being added while the agent is walking.

There’s an included component called “Patrol” which showcases a similar behavior.