Rotation value 180 always resets to 0?

I have a blueprint actor in my scene. In the level blueprint I have tied 3 inputs to it which change it’s rotation. For example, lets say the X, Y and Z keys each add positive 90 degrees to it’s local rotation in the X, Y and Z axis respectively.

Here’s the rub: Rotating about the X and Z axis works flawlessly, but the Y rotation doesn’t. I would expect 4 presses of the same key to rotate a full 360 degrees and return it to it’s starting rotation, however the Y axis does not.The blueprint is set up in an identical fashion as the other axis, but after the second execution it resets Y Rotation to 0.

Example

[Press Y]
Actor rotates from Y Rotation 0 to 90

[Press Y]
Actor rotates from Y Rotation 90 to 180

[Press Y]
Actor rotates from Y Rotation 0 to 90

Forgive me if this is hard to explain, I am just at a loss as to why 1 axis is behaving differently from the other two. Any help would be appreciated.

So I solved the problem. I apologize if this sounds abstract without screenshots, but here was the issue:

My blueprint network looked a little like this.

[Press Y Key] → [Get Y Rotation of Actor] → [Set variable “y_rot”] → [(Some timeline lerp nodes to control the rotation animation, referencing “y_rot”)] → [Set actor Y rotation to ‘y_rot’] → [Set ‘y_rot’ variable to new y rotation of actor]

I did some debugging by adding two [Print String] instructions to two different inputs. One of them printed the rotation value of my actor, and the other input printed the float value in my “y_rot” variable. In theory, they should always be the same. I then changed the increment of my rotation command to 20 degrees (down from 90). So each execution would increase the rotation on the Y axis from 0 to 20, 20 to 40, etc.

I found that once this value exceeded 90 it would “invert” the value (for lack of the proper math term). So I would press the Y key to advance the rotation from 80 to 100, and after that my two [Print Strings] would disagree: one saying 100, the other saying 80. Further presses of Y repeated the same rotation from 80 degrees to 100, over and over.

I removed the first [Set variable “y_rot”] node from my network and it solved the problem.

I still don’t know what’s causing this. But I’m glad I finally found a fix even though it’s unclear why it works.