Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects How to measure the distance between two points?

  • How to measure the distance between two points?

    Posted by Izaya Orihara on September 3, 2016 at 10:51 pm

    Hello.

    I simply want to know how to calculate the distance between two points in AE. For example, the distance between two layers (or their anchor points).

    I’ve seen many threads about this, and many recommend using the Vector Math expression: length(point1, point2)

    My problem is I don’t know how to use this expression to find the distance between my two layers. (even after reading up on expressions a lot, I’m still… an expression noob pretty much)
    Can someone please give me very exact and precise steps on how to use this expression to find the distance between two layers?
    Like, what do I do exactly? (ever single step, even if it’s basic)

    I’m sure the answer is simple

    Thanks!!

    Roei Tzoref replied 9 years, 11 months ago 2 Members · 3 Replies
  • 3 Replies
  • Roei Tzoref

    September 3, 2016 at 11:41 pm

    one way to do it is this:
    1. create a slider expression control – in the Effects and Presets type: “Slider” and add it to a null, or a solid, whatever you want.
    2. in the timeline expose the position of the 2 layers you want to set the distance (press P for both layers)
    3. alt click on the stopwatch to create the expression for the slider
    4. go to the little play button to choose an expression preset and go to Vector Match and choose length(point1. point2)
    5. highlight the word point1 and now pickwhip to the position (the word position) of layer A
    6. highlight the word point2 and now pickwhip to the position (the word position) of layer B
    7. click keypad enter
    8. be amazed

  • Izaya Orihara

    September 4, 2016 at 2:13 am

    *amazed*
    thank you very much!! exactly what I was looking for

  • Roei Tzoref

    September 4, 2016 at 8:27 am

    Great! glad to help and actually learned a new thing today because never used it myself so thank you.

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