Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Drive Y position of shape with Y position of another shape

  • Drive Y position of shape with Y position of another shape

    Posted by Christopher Handrick on September 5, 2012 at 10:20 pm

    Hello expression geniuses!

    I’m looking for a little help, I’ve tried random tinkering and googling to no avail.

    Is there a way to have the y position of one shape drive the y position of a second shape, without splitting the x,y values?

    I have two circles contained inside a single shape layer, and I’ve animated circle 1 to bob up and down with no movement on the x axis. I’d like circle 2 to follow along exactly with circle 1. Normally I’d just use the pick whip for this, but then it tries to use both the x and y values so I wind up with circle 2 bobbing on top of circle 1 rather than next to it.

    I had hoped that

    content(“left eye”).transform.position[1]=content(“right eye”).transform.position[1]

    would work, but that just kicks back an error.

    Any help is appreciated!

    Christopher Handrick replied 13 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    September 5, 2012 at 11:30 pm

    It should be like this:

    p = content(“left eye”).transform.position;
    [value[0],p[1]]

    Dan

  • Christopher Handrick

    September 6, 2012 at 2:49 pm

    Thanks Dan!

    That worked great. Perhaps one day I will master these crazy expressions, but until then I’m glad great people like you are around to help!

    – Chris

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