FORUMS: list search recent posts

How to measure the distance between two points?

FAQ   •   VIEW ALL How to measure the distance between two points? on Sep 3, 2016 at 10:51:13 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!! Re: How to measure the distance between two points?on Sep 3, 2016 at 11:41:52 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 Re: How to measure the distance between two points?on Sep 4, 2016 at 8:27:21 am