Spring arm rotation lag flip at 90 pitch

Not sure if this has been posted before since it’s been a problem for as long as I can remember, but I couldn’t find mention of it anywhere.

If rotation lag is enabled on a spring arm, and the actor rotates past 90° pitch the the spring arm glitches. At 90° it’s a small glitch, and at -90° it looks like it flips through a full 360° roll.

To recreate the problem, create a pawn with a spring arm and camera, enable camera rotation lag, and on tick do a addactorlocalrotation with pitch = 1.


The issue that you have reported is working by design (limitation of rotators). The rotation that you are seeing is meant to prevent gimbal lock. If you would like to prevent this from happening or being noticeable, you could turn off the rotation lag for the spring arm (which allows the cube to perform the flip over one frame (this is why it is not seen when the lag is not applied)) or you can convert the rotators to quaternions and handle the rotation math manually. I have provided a link to some information on quats. I hope that this information helps.

Quats math:

Link : Quaternions and spatial rotation - Wikipedia

Make it a great day

ok thanks. I’m not sure I fully understand and it seems strange that it’s working as intended but ok. I think the quaternion stuff is a bit advanced for me at the moment.
I made a simple workaround by plugging the actor’s inverted local rotation delta with an RInterpTo into a setRelativeRotation for the spring arm to fake camera lag instead.