Units dancing back and forth before reaching their target

Hi I am having an issue where units dance back and forth before reaching their target. They will eventually reach it, but not not before a lot of backtracking for seemingly no reason. An example of it is shown here:

At 12.52 these units

Move back for some reason, and does that several times. It is like the unit is blocking itself sometimes, and thus trying to go back to see if there is another way past.

Here is how my setup looks on a similar unit:


Could it perhaps be because I have a 2 circle colliders on the unit: 1 is the same size as the AIPath radius, but the other is much larger. In terms of this:

" Make sure that any children colliders do not extend beyond the bounds of the collider attached to the GameObject that the [DynamicGridObstacle] component is attached to since this script only updates the graph using the bounds of the collider on the same GameObject." I don’t think so however, as the larger collider is only a trigger and not blocking anything.

Is that relevant here and perhaps causing the issue, or am I doing something else wrong?

Are the only differences between this unit and the other units the fact that the problematic one has two colliders? Are their AIPath settings and Colliders identical? (As an aside, the screenshot you sent shows the Rigidbody, not the Collider(s) itself)

We can start by finding out what’s different between the unit vs the others, and then narrow it down from there :+1:

All the units have the same issue of dancing back and forth.
Here is how the two circle colliders look, don’t think its that interesting though. The not-trigger one is the smaller circle.


2024-08-29 21_40_22-SequelMM - Main - Windows, Mac, Linux - Unity 2022.3.22f1 DX11