How can I give smooth rotation to a strafing AI?

Currently my AI can enter a strafe state where it circles the player, the issue right now is that the rotation needed to do this is very snappy/glitchy looking. While strafing the AI continuously looks to the player using a rotational timeline, but the AI itself appears to snap back and forth while it strafes. I’ve tried disabling Orient Rotation to Movement while this happens but it doesn’t help at all. The current set up “works” technically speaking but it just doesn’t look good at all.

I’ve tried using RInterp as well but that causes the AI to move in a diamond pattern instead of circling the player.

The best I can describe the issue without video is that the AI will walk sideways looking at the player while strafing, but it will constantly snap to face its movement direction (such as looking forward) for a split second before resuming its normal strafe movement.

Here’s how I’ve got it set up at the moment:

And here is the timeline used:

The movement itself is based on AI Move To using the right and left vectors, if that helps.
Am I simply implementing the timeline wrong or would RInterp work and I’m using that wrong too?

Quick question…using either method that you currently have does the AI walk around the player as you want (regardless of its rotation that is) does it actually move in the circular direction that you want? If you are able to get the AI to move in the circle you can use a Set Focus node to get AI to look at the player and if you have a blendspace setup for the strafing then this should work as the AI will constantly look at the player…like this:

83053-setfocus.png

This will be used in the AI’s BT task

The way it is currently set up the AI strafes around the player due to its rotation rather than by plotting out a circular pattern for it to follow beforehand. The strafe itself is a AI Move To node that tells it to go using its Location + its right vector * 160 (or whatever float I set it for). Thus as the right or left vector keeps changing as the AI constantly faces the player it creates a circular motion.

Your method above actually made it a lot smoother and clean! I haven’t noticed any obvious jittering/snapping behavior. The issue right now is it doesn’t seem to constantly face the player, during an attack the AI might be facing to the right or the left of the player as it swings rather than directly towards them. That’s weird since the rotation is set in a service on the BT, so it should constantly be updating to face the player.
This might be due to my set up more than likely, unless the focus can’t be updated each tick.I’m marking your answer as correct if I’m able to get it working right using the Set Focus instead of my old method.

Or would the way I do my strafe not work with what you had in mind?

**edit yes the strafing does use a blendspace.

I’ve never used it on tick I’ve always just set it the one time but I don’t see why it wouldn’t work…the focus should be on the players pawn if you set it to just the player it may be setting its focus on the player controller…I haven’t seen your BP tasks so I can’t really tell you much more on them…take a closer look at how you are executing an attack to see what might make it offset the focus point

After fiddling with it some more this is looking like the direction I should go. It’ll take some more work to get everything working just as needed but this is definitely the way to go about it. The stuttering is gone and the AI doesn’t snap its rotation when strafing, thanks for the help man!