Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions X and Y position modifier

  • X and Y position modifier

    Posted by Allen Joaquin on January 9, 2014 at 2:36 pm

    hello, i am trying to link the x and y position of a null object to the x and y position of the effect ¨CC Cylinder¨

    Now the problem is that the value position of X in the null object is 614 and 614 for the cylinder would be 80.

    Which means the middle of the comp for the cylinder is [0] but for the null object the middle would be 640.

    The values are different, is there any way to make them equal? idk if i can explain myself, i basicly i want the cc cylinder effect to follow the null object x and y positon.

    Thanks!

    Allen Joaquin replied 12 years, 3 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    January 9, 2014 at 5:06 pm

    I think it’s going to look like this for x:

    fromComp(thisComp.layer(“Null 1”).transform.position)[0]-width/2

    and this for y:

    fromComp(thisComp.layer(“Null 1”).transform.position)[1]-height/2

  • Allen Joaquin

    January 9, 2014 at 5:15 pm

    Could you explain the expression used here? id like to know what it is exactly doing in case i´d like to modify it!

    Thanks a lot.

  • Dan Ebberts

    January 9, 2014 at 5:20 pm

    fromComp() converts the null’s coordinates from comp space to the layer’s space, [0] gives you the x component, -width/2 corrects for the fact that [0,0] in layer space is the upper left corner but it’s the center of the layer for CC Cylinder.

    Dan

  • Allen Joaquin

    January 9, 2014 at 5:55 pm

    thank you very much

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