This line can make the camera shake, especially if time_step has a large value:
my.pan += sign(ang(temp_ang.pan - my.pan)) * time_step * 5;
If "time_step" has a larger value? Could you explain please, how could that be? ^^ How could time_step has larger value?
And please, be so kind to explain, what "my.pan" has to do with camera's side-to-side shaking? And with camera itself?