Return-Path: Received: from mail-tul01m020-f169.google.com ([209.85.214.169] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 4564612 for AE-List@media-motion.tv; Thu, 15 Dec 2011 22:03:46 +0100 Received: by obcwo8 with SMTP id wo8so285698obc.28 for ; Thu, 15 Dec 2011 13:09:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=vEaLCar4ViTGWlnGFuqW/onrdOL/Bk5R8ClDKdjl+JE=; b=ttRpMuMppVgayeLMZGSbpcZgVT5rN2owMJ8fPiZKPwUmCw3iFa5WUY+FD4uo+B3XXS SyUZf1efH2lsHFg8pa+kDXeq7QutPYza/+17wShyjbqgPIxRRrJ5tHDDAJLSiLwmbGLS tMD5+Mqta6jJt+7c+83gt63piGRKWl+vToR7s= Received: by 10.182.139.102 with SMTP id qx6mr2557478obb.64.1323983389220; Thu, 15 Dec 2011 13:09:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.227.67 with HTTP; Thu, 15 Dec 2011 13:09:28 -0800 (PST) In-Reply-To: References: From: Byron Nash Date: Thu, 15 Dec 2011 16:09:28 -0500 Message-ID: Subject: Re: [AE] LookAt() in 2D space? To: After Effects Mail List Content-Type: multipart/alternative; boundary=e89a8f6472d99a5e5304b427e7d5 --e89a8f6472d99a5e5304b427e7d5 Content-Type: text/plain; charset=ISO-8859-1 Thanks Dan. On Thu, Dec 15, 2011 at 3:54 PM, Dan Ebberts wrote: > This should work: > > L = thisComp.layer("target"); > v = L.toComp(L.anchorPoint) - toComp(anchorPoint); > radiansToDegrees(Math.atan2(v[1],v[0])) > > > Dan > > *From:* Byron Nash > *Sent:* Thursday, December 15, 2011 12:35 PM > *To:* After Effects Mail List > *Subject:* [AE] LookAt() in 2D space? > > I feel like I have done this before but I'm coming up dry so far. What is > the syntax for getting a 2D layer to point at another one? LookAt() seems > to only work for 3D layers. > > thanks, > > Byron > --e89a8f6472d99a5e5304b427e7d5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks Dan.=A0

On Thu, Dec 15, 2011 at 3:= 54 PM, Dan Ebberts <debberts@comcast.net> wrote:
This should work:
=A0
L =3D thisComp.layer("target");
v =3D L.toComp(L.anchorPoint) - toComp(anchorPoint);
radiansToDegrees(Math.atan2(v[1],v[0]))
=A0
=A0
Dan
=A0
From: Byron Nash
Sent: Thursday, December 15, 2011 12:35 PM
Subject: [AE] LookAt() in 2D space?
=A0
I= =20 feel like I have done this before but I'm coming up dry so far. What is= the=20 syntax for getting a 2D layer to point at another one? LookAt() seems to on= ly=20 work for 3D layers.=A0=20
=A0
thanks,
=A0
Byron

--e89a8f6472d99a5e5304b427e7d5--