I was trying Unity3d when I had a strange problem:
I created an empty object A and its child object cube B.
Properties of A: Position-(0,0,0) Rotation-(0,0,0) Scale-(1,1,1)
Properties of B: Position-(0,2,0) Rotation-(0,0,0) Scale-(1,4,1)
I have made a C# script having a Transform object. It rotates using transform.localrotation only along z-axis. The problem is that if in Unity Editor I attach A as transform, B seems to rotate along one of its corners (I don't know how was that corner chosen) and if I attach B, it seems to rotate along its centre. I don't understand why this is happening? I know that in localrotation, parent rotation is taken into account. But initial rotation of A and B are both zero, so it should not matter.