Mailing List AE-List@media-motion.tv ? Message #45551
From: Dan Ebberts <debberts@comcast.net>
Subject: Re: [AE] 2d lookAt expression
Date: Thu, 30 Aug 2012 11:55:47 -0700
To: After Effects Mail List <AE-List@media-motion.tv>
Try this:
 
target = thisComp.layer("Null 2");
d = target.transform.position - transform.position;
radiansToDegrees(Math.atan2(d[1],d[0]))
 
Dan
 
Sent: Thursday, August 30, 2012 11:43 AM
Subject: [AE] 2d lookAt expression
 
Hi
 
Right now i am stuck trying to write a seemingly simple expression.
I want a normal 2d null to "look at" another 2d null and can't figure out what the expression should look like.
LookAt() seems like it is only for 3d layers? and my goto resource for quick tips for expressions, Dan Ebberts motionscript.com doesn't have anything on something this simple :-)
 
 
Robert Kjettrup / Grafiker / STV Mayday
Mobil: 25 18 95 16
Mail: robert@stvmayday.dk
 
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to ListMaster