How does Transform.Rotate actually work?

I’ve been trying to create a custom ragdoll system, which simply takes the jointed physics representation of the character and positions and rotates the bones of the visible character to match, but I’ve been having a lot of trouble.

I tried different methods of getting it all to work. I started out with this:


But as per my other question, it still wasn’t working, so I started experimenting. I discovered that if I did this:


It spun around wildly, which seems wrong. Then I found this post. Before seeing the accepted answer to that question, I believed that using Transform.Rotate with Space.World would rotate the object around World axes, regardless of the object’s current angle, and using Space.Self would rotate from the object’s current angle. After reading that post I’m not so sure. Does it rotate as though the pivot was at the world’s centre or what?

All I want to do is set the angles of one object to that of another with an angle offset. Why is this so difficult?

My question is this: How does Transform.Rotate actually work? I.e., what are the specific differences and workings of Space.Self and Space.World?

Actually, what I really want to know is why doesn’t this:


…set the angles to 0? Why not?? Why are rotations in Unity so complicated? I’ve never had this much trouble with rotations ever before!

So it turns out a lot of my problems were caused by the fact that I didn’t understand fully how Eulers are really annoying and bad. Now I do, and I have a solution to my root problem. See the answer to my other question for how I solved my problem.

To give a quick overview: Don’t use Eulers. It turns out they really can be stupid and annoying. Now I understand why Quaternions are so good.