Problem with animation change in Pathfinder

I have a problem with the pathfinder, I don’t know how to make the enemy’s animation change according to the direction it’s moving towards. And I have another problem, which is that it’s making some weird movements as if it’s teleporting and returning to its original position. I don’t know why it’s doing that

You can set objects as obstacles with the pathfinder obstacle behavior although, I don’t think it would be good for moving obstacles since it calculates its entire path when you use the move action and sticks to it. Doing too many recalculations would probably use too many resources.

You can’t use the separate objects on the object with the pathfinder behavior. Once started, it sticks to its path. You could switch the object order and have the other object move away.

If you’re using animation for the 4 directions then this should work. It checks the angle and allows a tolerance of plus or minus 45 degrees with 0 being right, 90 down, 180 left and 270 up.

Thank you, I’m going to try it