How to go back to first shot position when mag is empty

I don’t even know if that question makes sense… Moving on. I’ve been replicating how H1 works on UE4 for learning purposes and after a bunch of hours I managed to create a similar recoil pattern for the AK.

Now the issue I’m having (and I’ve searched a bit without success) is that I need the camera to go back to the first shot position after the mag is empty.
I have no idea where to start to be honest, help is much appreciated.



When you start shooting save the rotation of you camera in a variable. When your ammo is empty or you stop firing just set the rotation of the camera to the one you saved at the beginning of shooting.

Partially worked, it snapped the camera to a weird angel after I stopped shooting.
[video]May 24th 2017 - 7:00 pm - Camera Adjustment Test - YouTube

I made a little blueprint test in the third person example and got it to work.

The importance is to save the rotation before you rotate the camera first. I just culculate the rotation offset from the beginning and the reset rotation. Dividing by the controller yaw/pitch scale was very important.