Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Inverse Camera Z Orientation expression …. ?

  • Inverse Camera Z Orientation expression …. ?

    Posted by Tim West on December 14, 2011 at 2:35 pm

    Hi,

    I’m trying to write an expression which parents a some text to the inverse of a cameras Z orientation (not Z rotation).

    To explain – I have a camera which zooms in and out of various compositions and would like to sit some text in these scenes – whilst I want this text to exist in the 3D space I’d like it to remain level at all times (e.g. not be affected by the cameras Z rotation).

    Any help on how to achieve this would be appreciated!

    Thanks,

    T

    Dan Ebberts replied 14 years, 5 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    December 15, 2011 at 1:04 am

    Try this:

    c = thisComp.layer(“Camera 1”);
    v = c.toWorldVec([1,0,0]);
    radiansToDegrees(Math.asin(v[1]))

    Dan

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