- Home /
Question by
GLeBaTi · Apr 12, 2013 at 03:47 PM ·
rotationpivotlocalrotation
I don't understand how local rotation is working
I have a code:
forwardRudder.transform.RotateAroundLocal(Vector3.up, 2 * Time.deltaTime);
but he is rotate the rudder in global(not local) Y axis. Why?
Pivots:
Comment
Best Answer
Answer by whydoidoit · Apr 12, 2013 at 04:15 PM
RotateAroundLocal - is not documented and in fact I believe works in radians not degrees - as it is undocumented it's function is not guaranteed.
You could try this:
forwardRudder.transform.localRotation *= Quaternion.AngleAxis(2 * Time.deltaTime, Vector3.up);