Camera adds force on the right when resetting it

Hi ! I am currently creating a camera for a pawn and i want to reset it when the player doesn’t touch camera’s inputs for 5 seconds. It works fine but when resetting if i move the camera it adds a force on the right and I don’t know how to fix it. I joined my code in the topic so you can spot if there’s problems because i can’t say where it comes from.
Thank you so much any help is greatly appreciated !!

Hey @Agrilith!

So I think the problem is here.


I might be reading this wrong, but you’re getting the current Spring Arm position and the Camera’s relative rotation, then rotating the Spring Arm to match the Camera rotation… HOWEVER the Camera is almost always a child OF the spring arm. So every time you do this you’re altering the spring arm’s rotation AND the camera’s rotation, since they’re attached.

I am… not sure this is it because I can’t see what is happening, but I think this would be a good place to start looking! :slight_smile:

Oh sorry I forgot to mention but camera position is an arrow pointing directly in front of the player !! But I think it could maybe be a problem with the parent ty for your help i’ll look into that !

I made a gif to show the bug currently happening ! When resetting i’m going left with the camera but it puts a burst to the right and i don’t know why. I tried to change the hierarchy but it still doesn’t work…
ezgif.com-video-to-gif-converter