How do I calculate the number of rotations along 1 axis?

I am trying to have a variable that tracks the degrees of rotations that an enemy does.
The more it spins, the more the variable goes up.
I have a variable that records the world rotation on the previous frame, and subtract that from the rotations of the current frame, but the rotations are between 180 and -180, so I can’t get a simple variable to go up.

Do you guys know any math to figure it out?

Thanks.

Hey @MoXeDana ! Welcome to the forums!

Math can be tricky. Normally I try to lead people to figuring out a solution on your own but math is a different animal. This should get you all set up! Just use “Custom Event…” to make the Math events.


Hope this lifts your roadblock! Let us know how it works out! :smiley: