For pathfinding the dynamic obstacle behavior must be disabled, this time path can be created throug

Hello,

the DynamicObstacleScript works fine on a moving unit, but the nodes must be walkable in the time from start pathfinding until path completed (I use for that switching the layer to a walkable layer and then back.). In my case, two units recognize that they would collide frontal with each other, and both trying to find a new path. The start position if the path is not the position of the unit, it is shifted a bit right side to ensure that the new paths are on different sides.
The problem is, both repathing at the same time, both must make the terrain movable to let the pathfinder find a path (else the pathfinder would be blocked by the units own non walkable nodes) and they create paths through each other.

I can change the logic in this case, by just letting one unit pathfinding, but however this can happen in other situations and it ends with brutal ramming of phisical steering/turning units, or blocking each other forever.

Is there any good solution for the time from start pathfinding until path completed? How to make the nodes under the unit pathfinding possible and disallow another units tu create paths through it?

Thanks in advance for your answers!

Hi

In most cases I recommend some kind of local avoidance instead of pathfinding for this.

If you only have a low number of units, you could use tags.
A character marks the nodes below it with a specific tag that only that character can traverse (set on the Seeker component), the other characters do the same for their corresponding tags.
You would have to modify the script for this however.