motion graphics eXchange

2D Look at

Thumbnail for: 2D Look at
Apply this Expression to the Rotation channel of any layer you wish to control.
After Effects 7

Views: 14382
Set LookAt, below, to the name of the layer you wish the layer to look at. If the controlled layer is not
initially pointing straight up, enter an offset amount in degrees, below, to adjust the direction
it is looking.
by Fred Lewis
LookAt = "ball"
offset = 0
diffx = position[0] - this_comp.layer(LookAt).position[0];
diffy = position[1] - this_comp.layer(LookAt).position[1];
if (diffx == 0) {
diffx = 1 }
sign = 1 + (-1 * (diffx / Math.abs(diffx))) * 90;
radians_to_degrees(Math.atan(diffy/diffx)) + sign + offset

(Min. Version: After Effects 7, Category: Camera, Type: Expressions)
posted by MaxX on Jan 08, 2009


Related topics:

Folding Template

Thumbnail for: Folding Template
folding and unfolding template free to use.
Require After Effects CS6
After Effects CS6
Projects (aep)

Views: 53650
posted by fsimoni on Nov 05, 2012

Product, Service or App Promotion

Thumbnail for: Product, Service or App Promotion
After Effects Template. Promote your app, product or service
After Effects CS5
Useful things
Projects (aep)

Views: 29257
posted by RedSpikeFx on Oct 30, 2012

Clean Logo V2

Thumbnail for: Clean Logo V2
After Effects CS4,CS5,CS5.5 and CS6 template logo reveal
After Effects CS4
Projects (aep)

Views: 34774
posted by aedaddy on Aug 19, 2012



follow us on in touch on facebook