AI movement rotation

Hi all,
I’m having an issue which i don’t seem to be able to work out and could do with some help.

I have a AI character with a behavior tree attached, this consists of moveto node for various tasks. My issue is that once a task is selected my AI character snaps to the rotation of travel if its different to the face its already facing. How do i implement it so that the character either rotates gradually to the correct orientation ?

Im planning to add turning animations into my animation BP soon, and would also like to use these in conjunction with the rotation of the above, but im not sure the best approach for doing either of these.

Any help would be appericated

I don’t remember exactly, but I think you have to do the following:

In the character’s Class Defaults, uncheck “Use Controller Rotation Yaw”.

In the MovementComponent check UseControllerDesiredRotation and OrientRotationToMovement. And set a value to Yaw Rotation Rate.

If I’m wrong, play with these values.

Ghar is pretty much spot on, except that you should check just one of UseControllerDesiredRotation and OrientRotationToMovement. The latter will actually override the former if checked. OrientRotationToMovement is probably what you want.

Note that this does not make the character wait until it is facing the right direction before moving, so if your rotation rate is low, you will see the character moving backwards/sideways until it has finished aligning itself to its movement direction. I believe currently the only way to avoid this is to override the path following component in c++ and implement the logic yourself.

Thanks for the help. Spot-on!