Quaternion Z value jump between 180 and 0

There are 2 methods that spin the wheels of a car. The first one rotates the wheels in Y, between -30 and 30, while the second should turn the wheels in X.

Works if you don’t use both at the same time. But if used, Z starts to jump between 0 and 180

First:

            detail._detail.transform.localRotation = Quaternion.Slerp(Quaternion.Euler(detail._detail.transform.localEulerAngles.x, -30, detail._detail.transform.localEulerAngles.z), Quaternion.Euler(detail._detail.transform.localEulerAngles.x, 30, detail._detail.transform.localEulerAngles.z), t);

Second:

    detail._detail.transform.Rotate(new Vector3(10, 0, 0));

Generally don’t read from Quaternion eulerAngles. Here’s more of a discussion:

https://starmanta.gitbooks.io/unitytipsredux/content/second-question.html