Last active
April 12, 2018 16:59
-
-
Save animoplex/3ab618662331afe664334607a116de1b to your computer and use it in GitHub Desktop.
Pixel Length Calculator - After Effects Expression by Animoplex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pixel Length Calculator - Created by Animoplex: www.animoplex.com | |
// Calculates the length (in pixels) of two positions or points in 2D or 3D space. | |
// USE FOR: Any property that needs a dynamic length calculated. | |
// Variation A | |
// Apply to camera's Focus Distance property | |
length(pointOfInterest, position) | |
// Variation B | |
// Link two layers to obj1 and obj2 for their length | |
obj1 = thisComp.layer("OBJECT 1 LAYER NAME").transform.position; | |
obj2 = thisComp.layer("OBJECT 2 LAYER NAME").transform.position; | |
length(obj1, obj2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment