Rotation QUestion

Hi, so I’m using Transform.rotate to rotate an object by a specific angle. But, is there anyway to hard code a rotation to an amount (i.e. rotation = 0.0f) rather than an offset as you do with transform.rotation? (which rotates by a specific angle).

Thanks !

transform.eulerAngles, or transform.rotation = Quaternion.Euler();

–Eric

Also note that there is no Transform.rotate, and Transform.rotation doesn’t do what you describe.

Check out some of the topics i have created. There is a lot of code there on rotation and even how to limit the rotation by a certain degree as well.

Such as http://forum.unity3d.com/threads/73220-How-do-I-get-a-sphere-to-collide-INSIDE-a-bigger-sphere. this one