Check out the [documentation][1]. If you don't specify which frame of reference to use, it uses the world frame. What you want for this code to work is the local frame. You can achieve this by adding Space.Self as a second parameter to the transform.Rotate() calls.
[1]: http://docs.unity3d.com/ScriptReference/Transform.Rotate.html
↧