Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Controling x,y,z position with marks

  • Controling x,y,z position with marks

    Posted by Marcelo Cabral on May 7, 2018 at 1:39 am

    Hi. I need an expression to make the following movement.
    I have in the scene a 3D null object named “control”. Also, I have an adjustment layer with 4 marks named, “x1”, “x2”, “x3” and “x4”. What I need is an expression to control the null movement this way:
    When the indicator pass over the mark “x1” the null will move from xyz position 1 to xyz position 2. The time duration of this movement will be the distance between mark “x1” and “x2” in the timeline.
    Then the null will keep the position 2 until the indicator pass over the mark “x3” which will make it move from the position 2 to the position 1 again. The duration of this movement has to be controlled by the distance between “x3” and “x4” marks. All the movements have to be smooth like easy in and easy out.

    Thank you in advance for your help!!

    Marcelo

    Marcelo Cabral replied 8 years ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    May 7, 2018 at 4:58 am

    Like this maybe:


    p1 = [0,0,0];
    p2 = [200,200,200];
    m = thisComp.layer("Adjustment Layer").marker;
    if (time < m.key(2).time)
    ease(time,m.key(1).time,m.key(2).time,p1,p2)
    else
    ease(time,m.key(3).time,m.key(4).time,p2,p1);

    Dan

  • Marcelo Cabral

    May 7, 2018 at 11:05 am

    Hi Dan, Thank you for your help. It works perfectly. Is there some way to make the easy movement even smoother? thank you.

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