Character turns 180 degrees after arriving at AI Move To destination

Using “Orient Rotation To Movement” on the character movement component leads to strange behavior when combined with “Use Acceleration For Paths”.

I have some AI characters that walk around.

I have set the character acceleration to 300 and deceleration to 200. This makes the character start to walk and stop walking at a natural rate compared to instant start stop. I need to set “use acceleration for paths” or the engine ignores these values and does instant start stop.

However the problem I have is when the character “arrives” at the AI Move To location it slows down normally as you would expect just before arriving, but at the last second actually moves slightly backwards if you look close (maybe it overshot and then backed up).

This leads to the character rotating 180 degrees to “face” the new direction of “backwards” movement… Obviously not what I want to happen, I want the character to arrive and stop and not turn at all.

So right now every time a character arrives at a spot they turn 180 degrees at the last second.

I am wondering if I have missed some other settings or have some other issue causing the problem because it seems like a fairly normal use case to be having this kind of broken functionality.

I guess I could uncheck “Orient Rotation to Movement” and write my own piece to rotate the character towards their forward vector… and then one way or another ignore the last bit of “backwards” motion upon arrival. Seems like I shouldn’t need to do that kind of band-aid though.

Any thoughts?

1 Like

It possible your target location has a collision causing your ai to move backward or somehow the target location is pushed backward.
I thk there some visual debugging for nav mesh, you could research on that. AI Debugging | Unreal Engine Documentation

I am trying this out with a flat landscape without obstacles. I will try to setup the same situation with a basic third person template to see if I can reproduce it or discover what’s happening with my project.