AI slowly rotates facing player problem

So my question is how can I make this code slow the AI’s rotation towards the player slower than it currently is. Pretty much at the moment the AI will smoothly turn towards the player like it should, however the AI can still turn fast enough to shoot directly at the player even if he flies above, below or strafing around it.

The effect i’m aiming for is like a floating/flying turning effect where the ai will rotate towards the player smoothly but it will take like 1.5 or 2 seconds to fully rotate towards the player, thus giving the player the feeling like he can out maneuver the ai and possibly shoot it from behind or something like that.

Any help would be most appreciated.

I’d suggest trying the RInterpTo node instead. Lerping between the same values plugged into A and B there is actually a redundant step - that’s like asking a kid to “pick a number between 28 and 28” and him saying “28 - I win!”.

RInterpTo can be used to say “Okay I’m looking over here” (current pin) “but I want to look over there” (target pin) “so start moving my barrel over towards there at some controllable speed” (interp speed pin) “a little bit every tick” (delta time pin).

In addition to what you already have, a Get Actor Rotation node can feed the current pin. Find Look At will give you a rotation as a target. Delta time can be tied directly back to the Delta Seconds on the Tick event, but if you’re in a custom function (like a timer) you can also find Get World Delta Seconds like I show below too. Interp Speed is something you’ll have to tune - I’d start with a value of 2. Higher numbers turn faster. IDK if this is accurate but in my head I think of it as “degrees per tick”. So a value of 2 @ ~60 fps is roughly 120 degrees per second - or 3 seconds to make a full loop. Note that this version of RInterpTo has some ease in and out giving a smooth rotation like you drew in your timeline there - there’s also a “Constant” version that’s got no acceleration in it if you ever need that.

PS: For a turret, you might want to spin just a component (like a gun barrel) and not the whole actor - so remember that you can feed components in those target pins that say “self” to move just certain parts of it later on.

https://s32.postimg.org/f0c5hnhr9/Junk.jpg

I think your issue is that you are interpolating between two inputs of the same value. I think you want the first input to the lerp node to be your current rotation. You may also have issues with this because you are setting the actor rotation between each lerp, so you might need to save the start rotation out into a local variable and feed that into the lerp instead.

I tried that code exactly and my monster turns super slow and jerky, I even tried making the tick speed faster to make the turn smoother but in doing so I ran into the same problem where the monster would turn fast enough to always be facing the player.