Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression question

  • Expression question

    Posted by Benjamin Tubb on April 24, 2006 at 5:54 am

    I’ve got a spotlight in my comp, and I’ve popped an expression onto the position of it, so it follows the point of interest. Problem is, I want it to follow it, but always be 145 less on the Z property. I know you just type “-145” at the end, but that edits the X property. And I know nothing about expressions, but I kept trying anyways… I thought maybe if I typed at the end (-0,-0,-145) that would work, but it didn’t. I tried though, and that’s what counts. Anyone want to help me?

    Thanks,
    Ben Tubb

    “Of course, I could be wrong. In fact, I’m probably wrong.”

    Benjamin Tubb replied 20 years ago 3 Members · 4 Replies
  • 4 Replies
  • Steve Roberts

    April 24, 2006 at 6:25 am

    Whenever you want to do something to a specific axis of motion, think of this expression:

    [position[0],position[1],position[2]]

    … which is the old way of writing “position”.

    so try:

    [position[0],position[1],thisComp.layer(“leader”).position[2]-145]

    … if your the leading layer is named “leader”, say. Try writing the first expression, then highlighting “position[2]” and dragging it to the Z position of the leader, then adding “-145” to the end.

    But I’ll bet Dan has something more elegant. 🙂

  • Dan Ebberts

    April 24, 2006 at 1:08 pm

    You were close. You just need to subtract [0,0,145]

    Dan

  • Steve Roberts

    April 24, 2006 at 1:39 pm

    Told ya. 🙂

  • Benjamin Tubb

    April 24, 2006 at 4:02 pm

    Ah, it seems so obvious now! Thanks so much for the quick response.

    Ben Tubb

    “Of course, I could be wrong. In fact, I’m probably wrong.”

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