Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Orienting layer based on a vector.

  • Orienting layer based on a vector.

    Posted by Wouter Bruneel on November 21, 2009 at 3:19 am

    Hello everyone,

    Here’s what I’m up to. I’m making a stylized tree. All the leaves would be points on a sphere. So i have expression set for their coordinates based on the index of the layer to construct the leaves-sphere. that works well enough for the position of the leaves but i’m having trouble with the orientation. I want the leaves to be perpendicular to the vector from the origin of the sphere to the position point of the leave. I cant use auto-orient to a path since there is no motion path.

    Can anyone think of a way to make sure a layer is perpendicular to a given vector?

    thanks,

    Wouter

    Wouter Bruneel replied 16 years, 6 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    November 22, 2009 at 12:02 am

    Depending on how you define the center of your sphere, an orientation expression like this could work:

    center = [thisComp.width/2,thisComp.height/2,0];
    lookAt(toWorld(anchorPoint),center)

    Dan

  • Wouter Bruneel

    November 22, 2009 at 12:28 am

    Thanks dan,

    That solved it. I’ll have to figure out what it actually does but for now i’m happy to just copy paste it.

    thanks again,

    Wouter

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