I want to set an object’s rotation to sth by y axis from a script. but whenever I try to set it to something it goes to 180 and stays there. And it cant be a problem with my scene, because I tried the following:
I made a new project and a new scene. I placed a cube. I made a script which only had the following:
function Update() {
transform.rotation.y += 1;
}
The cube should start rotating along y axis, shouldn’t it? But what happens is that its rotation will go to 180 immediately and stay there!
What is the matter? Is it a bug from unity3? Are there any solutions?