Characters stuck in a loop

Hi!

my character’s movement after finding a path fails some times. For some reason, it walks to the destination, then it kind of goes up and down a few pixels. I see that the seeker shows a new path, a really small one, up and down the whole time, and it never gets to look for the next destination. After waiting around 30 seconds maybe, some characters get out of that loop and goes to the next destination.

What are the possible reasons for this to happen?

Hi

Are you using a custom movement script?

Yes I am actually. I am not sure if that was the reason, because I was changing many things to fix it. At the end, the character got stuck again in a loop but almost at the end of the path. I realized that the scanning area for some reason was set to smaller than the screen size, so it could not reach the endpoint, and caused it to get stuck at the end. The “stuck” situation happened twice, in the beginning and in the end. In the beginning though I am not sure why. But it has not happened anymore. I changed them so they are not obstacles anymore.