Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Opposite x and y position with expressions

  • Opposite x and y position with expressions

    Posted by Marcelo Cabral on March 12, 2013 at 1:47 pm

    Hi
    I have a null object which will be my “leader” and a solid behind this null. What I need is when the leader moves in x and y position the solid moves in the opposite position in x and y as well.
    I want to know also how to move others parented solids in the same way but faster and slower than the leader.
    Thanks alot in advance.

    Marcelo Cabral replied 13 years, 1 month ago 2 Members · 2 Replies
  • 2 Replies
  • Mitch Mann

    March 12, 2013 at 4:08 pm

    Expression on Solid’s Position:
    MyX = -thisComp.layer(“Null 1”).transform.position[0];
    MyY = -thisComp.layer(“Null 1”).transform.position[1];
    [MyX,MyY]

    Keep in mind that this will result in negative X & Y positions, which means they won’t be on the comp, they’ll be below zero. Just parent both the Null and the Solid to a master null in the middle of the comp to fix this.

    For faster and slower, just multiply or divide the results of this expression.

    Mitch

  • Marcelo Cabral

    March 12, 2013 at 4:19 pm

    Thank you Mitch!! It works pervectely. Have a nice day man.:)

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