How do I get my enemy AI to rotate as they patrol?

I have enemies placed around my level on patrolling patterns, but I cannot figure out how to get them to turn on the spot before continuing, instead of cutting to the direction they’re heading. As of now, I have the controller rotation yaw activated, but what I read tells me to have that disabled, yet I don’t understand. I also have an Orient Rotation to Movement in my enemy blueprint, but I don’t understand how to use it.

Thanks in advance!

The only suggestion I have is to create your own PathFollowingComponent derived class. Currently, most of the variables of that class are not accessible to blueprints.

This variable:
uint32 bStopMovementOnFinish

controls if they come to a complete stop before continuing to the next move to location.

For the visual component just follow up with an AimOffset blendspace for the animation of the character looking at his target location.

Hopefully that helps. =)

Unless they patrol into a dead end, and have to turn right round, it might look odd if they stopped completely and turned on the spot. You probably want them to turn by walking along a curve. However, it’s not obvious how to achieve that either, and in fact I would like to know for my own game.

Unfortunately that doesn’t really help, yeah. Is there a way to get this to work with what I have, which is simply the pathfinding code for all enemies within the level blueprint.I thought about adding a rotation component in there, but I don’t know what to put,

We did this by having the behavior tree, on arrival at a destination point, take a few seconds to rotate to the new target, then set a new Nav Point and go there.

It took a little blueprint code.

  • A DesiredFacing and a DesiredFaceingFlag that is the direction the Zombie should face and whether it is active. The character turns over time to that facing.
  • A Task that waits until the Character is faceing within 1 degree of the desired faceing.

I see. And is there a tutorial for me to be able to follow so that I can easily understand this concept?