Camera pitch change also starts to roll at max pitch values


I’m new to the UE4. Although I figured out a number of things, this problem has been a bit strange.

I created a very simple pitch movement on my camera, which is controlled by the mouse wheel actions. The camera is parented to a spring arm as well.

All I want it to do is just pitch up and down to simulate the camera looking up and down however, when the pitch gets to about 90 or -90 degrees, the rotation seems to get confused and rolls the camera slightly. I can then continue pitching up and down, but the roll angle remains. Please see my very basic blueprint below and thanks.

OK, I got it working for what I need it to do. Apparently the roll/yaw happening on pitch values >= 90 or <= -90 is a bug? I just limited the max pitch values as per the below blueprint and did the same for -90 and pitching downwards.

It’s not a bug. It is called “Gimbal Lock”. It is a limitation of Eular Angles. You can workaround with limiting the angles, therefore losing some accuracy that might not be noticable in game, or you can use FQuat (Quaternions).