Worldspace EulerAngle.x regardless of z rotation ?

I need to know the global rotation, in Euler angles, specifically the x component of my GameObject. The problem is that the animation that rotates my game object on the x axis flips the z axis at 90 degree intervals. The animation makes the game object appear to do a 360 degree rotation but as the z axis changes the EulerAngles.x value appears to pingpong e.g. 350,340,320,290,260,290,320…

How can i calculate the EulerAngles.x component of my gameobject in respect to worldspace disregarding of the rotation applied to the z axis ?

So you’re spinning an object along its Z axis, and trying to get how far back it’s tilted?

Use .localRotation (‘local orientation’) instead of .rotation (‘world orientation’).

The issues is the model is a ball that is spinning on the z axis and rotating on the x axis. i need a way to find the worldspace rotation of x

The issues is the model is a ball that is spinning on the z axis and rotating on the x axis. i need a way to find the worldspace rotation of x