Smooth Rotation

I am trying to make an enemy that focuses on the player and smoothly rotates to face the player however i want it to be stoppable so at times it wouldnt be tracking the enemy. I tried using this system but it was very choppy.

Hey @ItsssYucky!

The reason it’s choppy is because you’re doing this on tick, so it’s restarting every tick.

The RInterpTo is starting, but not able to finish because it’s restarting- You’ll need to use Event Receive Execute AI, then the RInterpTo needs an InterpSpeed float or it will be instant. :slight_smile:

Hope that helps!

Pawns actually have this built in to them. If you use the settings like below, it should smoothly rotate whenever you set the control rotation either via “Set Focus” or “Rotate to Face” in the behavior tree.

(Mainly enable “Use Controller Desired Rotation” and disable “Use Controller Rotation Yaw” I believe.

Hi SgtFlexxx
I tried using this but its still somewhat choppy. As i lower the number it gets better to a point but no matter how much i lower it, its still somewhat choppy

Hi Mind-Brain,

It seems to be operating the same when i switch between. Ik the machanics behind it are differnet but it seems to be just as choppy. Could it be something about interp speed?

Actually i just lowered the rotation rate to 90 and used my event receive task ai and it seems to have been fixed. Thank you both so much for the help

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.