1 Reply Latest reply on Jul 16, 2012 11:21 PM by NokiaDDT

    How to get specified location after Rotate3D?

    NokiaDDT

      Dears,

       

      I have a picture (image1, (0,0), w=500, h=500), after rotate3D (center, -45 degrees) by x-axis, how did I do to caculate the new 3D (or 2D) position at particular point (assume the original point position is (30,60))?

       

      [code]

         // a particular point in the picture.

         var wantedPoint:Point = new Point(30,60);

       

        // rotate image around X-axis -45 degrees

        var rotate3D:Rotate3D = new Rotate3D(myImage);

                                              rotate3D.angleXTo = -45;

                                              rotate3D.autoCenterTransform = true;

                                              rotate3D.play();

       

        // some process to caculate the new wantedPoint

         trace(wantedPoint);

      [/code]

       

      I find some properties [myImage.postLayoutTransformOffsets.x/y/z] , but it seems that not all of offsets are same in whole picture. Please give me a hand or a hint (or answer better ), thanks.