Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Dan Ebberts

    March 13, 2011 at 8:20 pm

    Give this a try. It will work best if your text layer’s anchor point is in the center of the text.


    L = thisComp.layer("Light 1");
    p = fromWorld(L.toWorld([0,0,0]));
    y = p[1];
    try{
    x = toCompVec([0,0,1])[2] > 0 ? p[0] : -p[0];
    }catch(err){
    x = p[0];
    }
    radiansToDegrees(Math.atan2(y,x)) + 90

    Dan

  • Jack Parks

    March 13, 2011 at 9:56 pm

    This is really helpful, I will give it a try.
    Thanks

  • Jack Parks

    March 14, 2011 at 4:19 pm

    Hi Dan
    This works great on the alpha bevel effect, is there a way to adapt it to get the opposite angle? So it can be used with colour emboss effect?
    Thanks again for your help.

  • Dan Ebberts

    March 14, 2011 at 5:42 pm

    Try changing the last line to:

    radiansToDegrees(Math.atan2(y,x)) – 90

    Dan

  • Jack Parks

    March 14, 2011 at 5:54 pm

    Perfect, thanks.

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