Skip to content

Distance 2D

Brief Description

This generator returns the distance between 2 points, based on the transformations that affect each layer. This is useful to drive other parameters based on the distance. For example the Scale of a Layer could be set to the distance between this Layer and another Layer, making it appear smaller when layers are closer and bigger when they are apart.

Controls

Parameter / Script Name Type Default Function
Enabled / enabled Boolean On
Source A Mode / mode0 Choice This Transform's Position
- This Transform's Position
- Linked Layer/Path/Transform
- Custom Point
Layer/Path/Transform A / link0 Link - This parameter allows to link either to a 2D Transform, 2D Layer, 2D Path
Point A / customPos0 Float 2D 0, 0
Source B Mode / mode1 Choice Custom Point
- This Transform's Position
- Linked Layer/Path/Transform
- Custom Point
Layer/Path/Transform B / link1 Link - This parameter allows to link either to a 2D Transform, 2D Layer, 2D Path
Point B / customPos1 Float 2D 0, 0
Multiplier / multiplier Float 1