Mailing List AE-List@media-motion.tv ? Message #45561
From: Robert Kjettrup <robert@stvmayday.dk>
Subject: Re: [AE] 2d lookAt expression
Date: Thu, 30 Aug 2012 23:49:07 +0200
To: After Effects Mail List <AE-List@media-motion.tv>
Hi Dan

thanks, works perfectly.


Robert Kjettrup / Grafiker / STV Mayday
Mobil: 25 18 95 16
Mail: robert@stvmayday.dk


2012/8/30 Dan Ebberts <debberts@comcast.net>
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