Return-Path: Received: from mail-vb0-f41.google.com ([209.85.212.41] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 4830838 for AE-List@media-motion.tv; Thu, 30 Aug 2012 23:48:38 +0200 Received: by vbkv13 with SMTP id v13so2484614vbk.28 for ; Thu, 30 Aug 2012 14:49:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=KxhZjctvvp8z7aJgAot5g0L6uX6AOA4uJk82U4E4AJM=; b=c9U7RpL3sgnH14MqR1AOm+/ezST0pvobqzuq+5tXM92DoA9YRnMiemStH85TnAjNRp PVlUWQtom3JGrh5bWvVAO5KE3ZY4qTAmuUzBEoXmQKNycUim2MTOUDNW9tEZy0cOJDc5 b6QcsZv+HjVbIUB4dXsXFtoRvxXjI2AlyeZRg/UYKlyA2c7WSscCn0KA00FxJSyeFdOX MXZT4mtGzDqGlvDiuxQ3VFiRnR+hH+V6BTRd5m95HfPD59lfSzSblwTywD+aynBv90QE ogw+xoX7hv6GmBhmoHbnJkjKJji/WZJoj0egfOKYkae8ciPms4ByIz3W20m9pCwmoYRo w8DQ== Received: by 10.52.92.200 with SMTP id co8mr3450133vdb.131.1346363368846; Thu, 30 Aug 2012 14:49:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.18.212 with HTTP; Thu, 30 Aug 2012 14:49:07 -0700 (PDT) In-Reply-To: References: From: Robert Kjettrup Date: Thu, 30 Aug 2012 23:49:07 +0200 Message-ID: Subject: Re: [AE] 2d lookAt expression To: After Effects Mail List Content-Type: multipart/alternative; boundary=20cf307d05b056b5b404c882a653 X-Gm-Message-State: ALoCoQkU/LLnNem0K9P4W+wjjj165KnIOhBJPGoeNuhPSqZsTDQ/cHvfjPQ5XInA/W0vsIfG+gVV --20cf307d05b056b5b404c882a653 Content-Type: text/plain; charset=ISO-8859-1 Hi Dan thanks, works perfectly. Robert Kjettrup / Grafiker / STV Mayday Mobil: 25 18 95 16 Mail: robert@stvmayday.dk 2012/8/30 Dan Ebberts > Try this: > > target = thisComp.layer("Null 2"); > d = target.transform.position - transform.position; > radiansToDegrees(Math.atan2(d[1],d[0])) > > Dan > > *From:* Robert Kjettrup > *Sent:* Thursday, August 30, 2012 11:43 AM > *To:* After Effects Mail List > *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 > --20cf307d05b056b5b404c882a653 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
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@comc= ast.net>
Try this:
=A0
target =3D thisComp.layer("Null 2");
d =3D target.transform.position - transform.position;
radiansToDegrees(Math.atan2(d[1],d[0]))
=A0
Dan
=A0
Sent: Thursday, August 30, 2012 11:43 AM
Subject: [AE] 2d lookAt expression
=A0
Hi
=A0
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=20 what the expression should look like.
LookAt() seems like it is only for 3d layers? and my goto resource for= =20 quick tips for expressions, Dan Ebberts motionscript.com doesn't have anything on=20 something this simple :-)
=A0
=A0
Robert Kjettrup / Grafiker / STV Mayday
Mobil: 25 18 95=20 16
Mail: robert= @stvmayday.dk

--20cf307d05b056b5b404c882a653--