Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Auto Orient not working with expression.

  • Auto Orient not working with expression.

  • Ranveer Singh

    June 15, 2021 at 6:20 pm

    I want an arrowhead to follow a path. For which I am using this expression on its position property.
    t=thisComp.layer(index+1).content(“Path”).content(“Path 1”).path;
    l=thisComp.layer(index+1).content(“Path”).content(“Trim Paths 1”).end;

    t.pointOnPath(percentage = l/100, t = time)

    Everything is working fine except the auto-Orient. As soon as the animation completes it stops working. It only rotates the layer if its position velocity is > 0. Otherwise, it sets the layer back to the original.

  • Robert Müller

    June 22, 2021 at 9:06 am

    Hi Ranveer, you could use the tangentOnPath function, like Dan discribed here:

    This might have some issues with a trim path end value of exactly 0, but you could add an if statement to set the value to something like 0.1 if the end is exactly at 0 🙂

    Auto Orient expression to use for path layer? (Don’t need built in AE option)

  • Ranveer Singh

    June 22, 2021 at 10:11 am

    It doesn’t matter what’s the value of my end or starting point is. It always glitches at the very beginning and end. It’s more like if the position velocity is more than 0 it will Auto orient it otherwise it won’t.

  • Robert Müller

    June 22, 2021 at 12:23 pm

    Yeaht thats the problem with auto orient, thats why you should use the expression I linked instead

Viewing 1 - 4 of 4 posts

Log in to reply.

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