Don't allow a new path to intersect another agent's path

Is there a way to make sure a new path won’t intersect an existing path?

Hi

I assume you mean intersect an existing path at the time another agent would be at the same position of the path.
That is called cooperative pathfinding, I have been doing some experiments with it, but it is not ready to be released I am afraid.

While that sounds awesome, what I meant is that if AgentA has made a path(regardless of where they are on the path) AgentB would be unable to make a path that intersects it until it AgentA’s path is gone.

Hi

While that is possible, I would not recommend it because it is very easy to trap agents that way or they will go out of their way to avoid other existing paths which will look like they are avoiding invisible obstacles or simply heading the wrong direction altogether.

When I get a few agents that are in a corner and trying to escape they sometimes will make paths which will prolong the problem because the paths intersect. I was hoping that if agents were at a certain low velocity I could prevent them from making a new path that intersects existing paths.