transform.rotation.x += 0.01

Hey, I made the following behaviour script:

function Update () {
transform.localRotation.x += .01;
}

It’s about one of the most complex things i’ve done so far! for real!

This is the problem, i’d expect my object to rotate constantly on its x axis, right?

Well, it does rotate, but it stops at certain point, and i’m unsure that it’s rotatin constantly, it looks like it has some sort of acceleration.

Anyone knows why? Doesnt make much sense to me!
Help please!

cause you should use the eulerAngles. you have quaterions there (x,y,z,w) yet you try to rotate it like it was euler angles :slight_smile:

Also that will be framerate-dependent, so use Time.deltaTime.

–Eric