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 4830770 for AE-List@media-motion.tv; Thu, 30 Aug 2012 22:08:21 +0200 Received: by vbkv13 with SMTP id v13so2374500vbk.28 for ; Thu, 30 Aug 2012 13:09:12 -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=jH04e1AVQDcIV5ftRy6rByeID4CfZavxByXNfoohITE=; b=kK0trZiITde1YDyLzYaVi9ohObvkDqkgAiroZzdZH8jvjUE0iCfRU8sOtHhR4/av7e LNDtegjeI6RduR7J56Ip1himaBlkhbNraP2iTeeLi3eQe3UMDNxjlM1uu7fH5crv+i+C M5x20uF+fXkvORvLrJIG3kMNfTRZ8oaOxeVk7ohrv5sW7MAyQa3cnWupgKDRaV5CbdLR JY40u1vq6qf/Fylp07p1UjFjpaE7tOrIMv8T5o0aFYTQ88qdVY9n8ghQL4dp2kjzkW/e jc5+xuLW5qQ2dLYuPV2JWa55vPTwYtPxIViBlP6uL5fqudG12vYIG3foFDw5MKfu3A2n cBmg== Received: by 10.58.240.15 with SMTP id vw15mr4284750vec.36.1346357352406; Thu, 30 Aug 2012 13:09:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.18.212 with HTTP; Thu, 30 Aug 2012 13:08:51 -0700 (PDT) In-Reply-To: References: From: Robert Kjettrup Date: Thu, 30 Aug 2012 22:08:51 +0200 Message-ID: Subject: Re: [AE] 2d lookAt expression To: After Effects Mail List Content-Type: multipart/alternative; boundary=047d7b86c30ebb1f1104c8813f74 X-Gm-Message-State: ALoCoQnqo21mpacEhfIZ0Z3MP9r7cUhwEz/Oi4OTYvUbOpuC9Cf73RQeMzCaMSr4grix7KHjvir0 --047d7b86c30ebb1f1104c8813f74 Content-Type: text/plain; charset=ISO-8859-1 Nevermind... found an answer on Creative Cow from Dan himself: p1 = thisComp.layer("Null 1").transform.position; p2 = thisComp.layer("Null 2").transform.position; d = p2 - p1; radiansToDegrees(Math.atan2(d[1],d[0])) http://forums.creativecow.net/readpost/227/21661 Robert Kjettrup / Grafiker / STV Mayday Mobil: 25 18 95 16 Mail: robert@stvmayday.dk 2012/8/30 Robert Kjettrup > 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 > --047d7b86c30ebb1f1104c8813f74 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable =A0Nevermind... found an answer on Creative Cow from Dan himself:
=
p1 =3D thisComp.layer("Null 1").transform.pos= ition;
p2 =3D thisComp.layer("Null 2").transform.positi= on;
d =3D p2 - p1;
radiansToDegrees(Math.atan2(d[1],d[0]))
=




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


2012/8/30 Robert Kjettrup <robert@stv= mayday.dk>
Hi

Ri= ght now i am stuck trying to write a seemingly simple expression.=A0
<= div>I want a normal 2d null to "look at" another 2d null and can&= #39;t figure out what the expression should look like.=A0
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 somet= hing this simple :-)


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

--047d7b86c30ebb1f1104c8813f74--