To determine the rotation, you take the rotation of the machine gun, but is it rigidly fixed to the body, or can you change its rotation?
It looks like your machine gun is pointing where it needs to, but the body and camera are just trying to follow that turn.
Do you use interpolation to make the body rotate smoothly?