Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions rotation drives position of diferent layer

  • rotation drives position of diferent layer

    Posted by Fred Gates on February 8, 2011 at 4:49 pm

    Hi I’m after a quick fix that will help me grasp some basics.

    I need to rotate one layer and have it drive the x position of another layer.

    I have just started to read motion script 101 but if some one could show me this it will
    a) sort my problem and B) be a great study aid.

    cheers

    Jim

    Fred Gates replied 15 years, 3 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    February 8, 2011 at 7:32 pm

    Something like this, probably:

    m = 10; // multiplying factor
    r = thisComp.layer(“Your Other Layer”).transform.rotation;
    value + [m*r,0]

    Adjust the value of m to amplify/diminish the effect

    Dan

  • Fred Gates

    February 9, 2011 at 10:45 am

    Hi Dan,

    thanks for your reply,

    I tweaked it because my cntrl layer(the one that will rotate) is in another comp.

    I applied it to the position of the layer I want to move in x but it fails, because of an undefined object.

    any help greatly appreciated

    m = 10; // multiplying factor
    r = Comp("fred").layer("cntrl").transform.rotation;
    value + [m*r,0]

    senior animator
    MGV London

  • Dan Ebberts

    February 9, 2011 at 2:15 pm

    Try changing Comp to comp.

    Dan

  • Fred Gates

    February 9, 2011 at 4:57 pm

    Cheers Dan,

    here begins my education 🙂

    Jim

    senior animator
    MGV London

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy