So I am trying to figure out why rotating an actor using only quaternions causes a flip of the calculated values at 90 and -90 degrees of pitch. I exposed some quaternion functions to blueprints, and am able to rotate the flying plane template 360 degrees over all 3 axis, however the “y” axis pitch is the only one that refuses to smoothly transition through the full rotation. I am aware that at these angles Yaw and Roll become 180/-180 because of Euler rotations but I thought the quaternion solution wouldn’t be affected by that abrupt switch from 0. Is there some calculation I am missing that is still using Euler rotations when creating these quaternions? Anyone know why this flip occurs instead of smoothly transitioning “W” from -1 to 1 across a full 360 degree rotation about a single axis? I have seen converters online and noticed either “W” or the rotated axis will have values from 1 to -1 while the other will always be positive values of 1 to 0 to 1 through a full 360 degree rotation but this does not occur in UE4.
This flip causes a “jitter” of the camera but otherwise doesn’t really affect rotation. Also, this is only an issue with lag enabled on the spring arm. With it disabled there is no jitter. Not sure if the calculations to perform the camera “lag” have an issue with the value change but the flying pawn without lag seems to do just fine.
For anyone else wondering about this at some point, it sems to be a bug, I found this report on a similar issue from back in January 2018. Good news, they plan to fix it in 4.21