Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions how make object follow path

  • how make object follow path

    Posted by Darasmith on July 18, 2005 at 3:31 pm

    is it possible to make aon object follow a path
    for example i want to make a line that follows a path i have drawn in illustrator and am using stoke in to do it so is it possible to place a graphic at the top of this that looks like its drawing the line

    Dara

    Dan Ebberts replied 20 years, 10 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    July 18, 2005 at 4:21 pm

    Here’s one way. Let’s say your layer with the stroked path is called “Stroke Layer”. Copy the mask shape for the path and paste it into the position parameter of your follower layer. This should create keyframes that cause the follower to trace out the path over a 2-second period. Then just add this expression for position to sync it up with the animation of the “End” parameter of the stroke effect:

    percent = thisComp.layer(“Stroke Layer”).effect(“Stroke”)(“End”);
    valueAtTime(2*percent/100)

    Dan

  • Darasmith

    July 19, 2005 at 10:18 am

    nearly have it working except when i paste the path into the position the shape it creates is streched out wider and so when i put in the expression i follows it right but it just goes out much wider left and right .

    does any of the foolwing nmake a difference

    i,m using pal wide screen
    its not a closed path

    thanks for the help

    Dara

  • Dan Ebberts

    July 19, 2005 at 1:30 pm

    It must be some mismatch in pixel aspect ratio between the comp and the layers. Does the path start out in the right place? What happens when you change the expression to this:

    percent = thisComp.layer(“Stroke Layer”).effect(“Stroke”)(“End”);
    valueAtTime(2*percent/100)/thisComp.pixelAspect

    What are the pixel aspect ratios of your layers?

    Dan

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