When rotating an entity about the y or z axis by setting the Euler angle, the rotation is continuous and smooth.
When rotating an entity about the x axis by setting the Euler angle, at 90° rotation stops, bounces between two values and/or reverses.
Is this a bug?
I was using a plain entity as an pivot point.
The issue seems to be applying successive rotations. Investigation shows Euler angles are reinterpreted as rotations about different axes (e.g. setLocalEulerAngles(0, -92, 0) becomes (180, -88, 180).
I’ve worked around the problem by keeping track of the angles locally then applying that value rather than trying to increment the existing Euler angles.
This was from a suggestion by yaustar’s from this thread (Understanding Euler rotation).