6 Replies Latest reply on Apr 28, 2009 12:16 PM by Rick Gerard

    Flip motion?


      I'm interested in doing a symetrical (mirrored) animation. Having animated one of the objects, I would think there must be an easy way copy it to the other. This is probably really basic, but could someone point me in the right direction? Thanks.

        • 1. Re: Flip motion?
          TimeRemapper Level 4

          Precompose (moving all attributes), and then invert the desired axial scale (disable the link icon next to the scale numeric values in the timeline, and enter "-100" for the axis you would like to invert).

          • 2. Re: Flip motion?
            ptelian Level 1

            Thanks. And what do you do to "invert"?

            • 3. Re: Flip motion?
              TimeRemapper Level 4
              And what do you do to "invert"?


              Select the precomposed layer in the timeline.

              Tap "s".

              Disable the little "link" icon next to the numeric scale values.

              Instead of postive [100,100] values, enter a negative value for which ever axis you want to mirror (i.e [-100,100]).

              • 4. Re: Flip motion?
                ptelian Level 1

                What I've done is copied the keyframes (position and rotation) onto the other layer (the layer I want to mirror). I want to mirror the motion of the first layer, on this one.

                • 5. Re: Flip motion?
                  Rick Gerard Adobe Community Professional & MVP

                  You can do several things. The easiest is an expression.


                  Let's talk theory first. You have a Master layer that moves and rotates around it's Anchor Point. You want to mirror the movement and rotation with a Slave layer.


                  To mirror the rotation is easy. All you have to do is to subtract the rotation value of the Master from the Slave. To generate the expression needed to do this reveal the rotation property of both layers, add an expression to the Slave layer Rotation property by Alt/Option clicking on the Rotation stopwatch, typing a minus sign and then use the pickwhip to point to the Masted layer's rotation property. The resulting expression is:





                  Let's talk a little theory here on position. If you want the Slave layer to move up when the Master moves down and right when the Master moves left you must calculate the difference between a known position and the current position of the Master layer then subtract that difference from the position of the Slave layer. I prefer to use the comp center as a starting point but you could use any point. You can dynamically retrieve the center of the composition by dividing the height and with by 2. The rest is just 4th grade math. Let's take a look at an expression:



                  master = thisComp.layer("Master").transform.position;

                  ip = position;

                  c = [thisComp.width/2, thisComp.height/2];

                  dif = master - c;

                  ip - dif


                  1. The first line just defines the master layer so we don't have to type so much
                  2. The second line is the ip (initial position) of the Slave layer
                  3. The third line defines the c (center) of the composition
                  4. The fourth line gives us the dif (difference) between the center of the comp and the current position of the composition
                  5. The fifth line subtracts the dif (offset from the original position) from the current position of the Slave layer


                  The same basic structure can be used to mirror just in x like a real mirror does by simply breaking the X and Y values out of the array. Let me know if that's what you want to do.

                  • 6. Re: Flip motion?
                    Rick Gerard Adobe Community Professional & MVP

                    Just for fun here's the position expression the mirrors like a mirror:



                    master = thisComp.layer("master").transform.position;

                    ip = position;

                    c = [thisComp.width/2, thisComp.height/2];

                    dif = master - c;

                    np = ip - dif;

                    [np[0], master[1]]


                    The difference is only in the last line. I defined np (new position) and then used only the x value or np[0] for X while simply copying the Y position of the master layer to the array. I hope this makes sense to you.


                    You'll find a CS3 project file here.