I have 2 DisplayObject, one containing the other like the code below:
var sprite1:Sprite = new Sprite();
sprite1.addChild(loader1); // assume that I have load picture on to loader1
loader1.rotationZ = 30;
sprite1.rotationZ = -30; If I run the code above, the image on loader1 will look just like it hasn't been rotate at all because its container rotate in opposite direction. Which is correct, as what I expected.
But, if I had multiple axis rotation to the code:
loader1.rotationZ = 30;
loader1.rotationY = 50;
sprite1.rotationZ = -30;
sprite1.rotationY = -50;
Now, loader1 will rotate in different angle. My question is, why it doesn't offset each other? Note that, both loader1 and sprite1's x,y,z position are all at 0,0,0. And this problem occurs regardless of rotationX,Y or Z. If you have 1 axis, it works fine. 2 axis, it won't.
I post this sample code because I'm trying to understand how Flash rotate in 3D. In AS3 document, it claims that it rotate around its "3D parent container" What is that?