Using finterpto to smooth rotation

Currently working with the flight template. Added this section to allow the camera to rotate left and right slightly when a yaw input is provided (similar to a neck rotating). Currently the camera jumps from the 0 value to the -15 or 15. Could anyone explain how I might smooth this out?

I can’t seem to figure out how to implement the finterpto node into this script and properly smooth that camera rotation. Could it be that my exec connection for the camera’s relative rotation is coming from that input yaw axis? Does this need to start at event begin play?


Don’t use SetRelativeRotation, change logic to use AddRelativeRotation(), it will handle gracefully cases when you go over -180 and 180 degrees.

Alright I will give that a try, will that also smooth out the rotation itself? Or just help in cases where I’m rotating more than 180 degrees?

For smooth and consistent rotation you need to add two things. One is delta time, it’s necessary so that rotation speed doesn’t change if FPS changes. For smoothing out “arrival” and “departure” of rotation you could use InterpFloat. So the final setup would be like this:

Interp nodes need to be called on every tick to interpolate value, this is why interpolation is called separately on Tick. You could add it into the top graph and it will work, but only because you get input from Axis value, which is called all the time, example that I show is more generic and will work with simple button presses too.

I know this post is old, but how do I mutiply axis value by 15 and delta seconds? When I place float * float, it only has 2 inputs…

you’ve probably figured it out already, but just click on the little “Add Pin” on the node

1 Like

click on “add pin”

Quite the necro for a question that was already answered.