View all expressions
Interpolation

Point To A Layer

Calculates the angle between two layers and points one to another.

target = thisComp.layer("Target");
targetPos = target.toWorld(target.anchorPoint);
delta = targetPos - thisLayer.position;
radians = Math.atan2(delta[1], delta[0]); radiansToDegrees(radians);
Point To A Layer

Practical use case

Calculates the angle between two layers and points one to another.

Check out similar expressions

Data-driven video workflows for After Effects are easier with Plainly.

a mesh of elegant lines transparent image