I want to rotate a transform to a specific angle, not add to the existing rotation. Currently, on every frame, I am doing:
transform.Rotate(Vector3.up * rotation);
What I expect is a smooth transition over time as "rotation" changes, however the object is spinning like crazy!
Do I need to use a method to grab the current rotation and then offset by that? Or is there a method that will allow me to directly set the rotation?
asked Jan 21 '12 at 07:41 PM
transform.localEulerAngles = new Vector3(x,y,z);
answered Jan 21 '12 at 11:37 PM