I have an object (cube) in the scene and I want it to continuously rotate on its only local X axis but suddenly while rotating on X axis its Y and Z axis rotation value goes 180 degrees for some frames, but it looks fine in the game view. Please help me to get out of this problem. It is also noted that this problem doesn't occur while rotating only on Y or Z axis. Code:-
void Update () {
transform.Rotate(new Vector3(1,0,0),
Space.Self);
}
No comments:
Post a Comment