motion graphics eXchange
top

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
Camera
Expressions

Views: 9121
Permalink
share this  error? 
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
Other
Projects (aep)

Views: 34577
Permalink
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: 16560
Permalink
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
Other
Projects (aep)

Views: 20775
Permalink
posted by aedaddy on Aug 19, 2012


 

 

follow us on http://twitter.com/mgxchangegoogle+get in touch on facebook

 

 

Full length video training series presented by motion graphics industry professionals. Click here to visit Motionworks website!