Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions 3D Corner Pin to corners of another layer

  • 3D Corner Pin to corners of another layer

    Posted by Dan Fredley on July 29, 2010 at 5:02 pm

    I am trying to connect two corner pin points to the upper right and lower right corners of another 3D layer using the 3D corner pin expression on motionscript.com, but I’m trying to convert the anchorPoint part to the upper right corner on the target layer:

    Can anyone tell me what I am doing wrong?

    Thanks.

    (link to motionscript: https://motionscript.com/design-guide/threeD-corner-pin.html)

    target=thisComp.layer("UL");
    fromComp(target.toComp([target.anchorPoint[0]+target.width/2,target.anchorPoint[1]+target.height/2,target.anchorPoint[3]])

    Dan Fredley replied 15 years, 9 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    July 29, 2010 at 6:05 pm

    Try this:

    target=thisComp.layer(“UL”);
    fromComp(target.toComp([target.width,0,0]))

    Dan

  • Dan Fredley

    July 29, 2010 at 6:14 pm

    That worked perfectly of course–thanks Dan. I also modified it to figure out the lower right corner of the target layer(for any of those interested):

    target=thisComp.layer("UL");
    fromComp(target.toComp([target.width,target.height,0]))

    Dan Fredley

  • Dan Fredley

    July 29, 2010 at 7:00 pm

    It worked until I tried to move the target layers in z-space–the expression no longer keeps the corner pin to the target layer. I tried different values in the z property to no avail.

    Dan Fredley

  • Dan Fredley

    July 29, 2010 at 7:09 pm

    Nevermind–the corner pin layer was accidentally set to be a 3D layer. Once I turned it to 2D it worked again.

    Dan Fredley

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy