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?
So, usually you lerp/interp two between two locations. The problem here is you have your logic via axis value, so you won’t be able to just go between two locations. Instead of setting the rotation (to 15 or -15, which is how you have it set), why not AddRelativeRotation instead? You can also try out the RotationMovementComponent. But if you really do want that Set, you just need to watch that video in the beginning and it’ll help you out!
If this helped, please upvote and mark as answered so we can close this out. Good luck!
Well, when I said location, I meant it as rotation as well. I guess I should have used transform instead. Regardless, AddRelativeRotation will rotate it however degrees you want. And keep doing it until you want to stop. Seeing how you were on input axis, that could work. But, you want the player to just press the stick to the left or right and they will roll from 0 to (-15/15). SetRelativeRotation will do that, if you just want them to tap it, but you might run into the problem if the player goes from left to right really fast. But anyway, watch the video, it explains how lerps/finterps work. You just need to put either of them before that Make Rotator and it will lerp it between those two points.
And to add to that. I forgot to mention Clamps! There are a few different ones in there, they basically do the same thing in the end, clamp values. So, What I would have done, instead of having this on inputaxis, I would put it as Action Maps, and then interp/lerp between the two positions. BUT, if you continue to use InputAxis, just clamp the values, addrotation, let the player control how far left or right they can roll. But that’s just me!