Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Move an object from one null position to another null position with Slider Control

  • Move an object from one null position to another null position with Slider Control

    Posted by Guido Giardino on June 14, 2018 at 1:15 am

    Hi! I have a difficult one!! I’m trying to create an expression but I’m far from the goal. I explain what I’m trying to do:

    I have 2 null objects. Both are moving independently along the composition. I need an expression that let me move one shape layer from the first null position (wherever it is), to the position of second null object (wherever it is too). And I think that will be nice to use an slider control in which 0 value will be perfect matching the first null position and 100 will be perfect matching the second null position. So wherever both null objects are, keyframing the slide control from 0 to 100 will move the shape layer object trough the position of the first null to the other null in a straight line.

    I hope you can help me!!!

    Sorry my poor english!!

    Best regards!

    Guido Giardino replied 7 years, 11 months ago 4 Members · 4 Replies
  • 4 Replies
  • Dirk De jong

    June 14, 2018 at 2:03 am

    [Guido Giardino] “I need an expression that let me move one shape layer from the first null position (wherever it is), to the position of second null object (wherever it is too). And I think that will be nice to use an slider control in which 0 value will be perfect matching the first null position and 100 will be perfect matching the second null position.”

    I’m not the most accomplished at expressions but I had an idea for this that seemed to work – the AE project is here ;
    https://kingluma.com/xpressionQuestion6-13-2018.aep.zip
    there is an expression control slider (0 to 100) applied to the shape layer that should do what you requested and the expression is applied to the position parameter of the shape layer

  • Kalleheikki Kannisto

    June 14, 2018 at 6:36 am

    I think it should be as simple as this, expression applied to object position:

    linear(pick-whip-slider-value-here, 0, 100, pick-whip-null-1-position-here, pick-whip-null-2-position-here)

    Kalleheikki Kannisto
    Senior Graphic Designer

  • Andreas Brand

    June 14, 2018 at 7:41 am

    Very fast solution!
    And if you want you can use markers on the shape layer instead of an extra slider controll.
    Just put two markers on the shape layer with this code in the position property:

    linear(time, thisLayer.marker.key(1).time, thisLayer.marker.key(2).time, pick-whip-null-1-position-here, pick-whip-null-2-position-here);

  • Guido Giardino

    June 14, 2018 at 12:39 pm

    Hi guys!! Awesome how easy you make things seem!! All of the solutions you post work perfect!!!

    Many many many thanks!!!

    Best Regards!!

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