ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

How to measure the distance between two points?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Izaya Orihara
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!!


Return to posts index

Roei Tzoref
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


Return to posts index

Izaya Orihara
Re: How to measure the distance between two points?
on Sep 4, 2016 at 2:13:54 am

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


Return to posts index


Roei Tzoref
Re: How to measure the distance between two points?
on Sep 4, 2016 at 8:27:21 am

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


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]