Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expression Help

  • Expression Help

    Posted by Eric Goldstein on April 15, 2009 at 5:34 pm

    Hi,

    I’m using this expression:

    thisComp.layer(“Main Hinge”).transform.position[2]

    to rotate a gear based on x position of another layer.

    It works, but I want to reverse the direction of the rotation
    and gear it down. Would someone suggest code I could use to do
    this?

    Thanks,

    Eric

    Eric Goldstein replied 17 years, 1 month ago 2 Members · 2 Replies
  • 2 Replies
  • Kevin Camp

    April 15, 2009 at 5:50 pm

    adding a minus to the beginning of the expression should do the trick:

    -thisComp.layer(“Main Hinge”).transform.position[2]

    or you could do:

    value – thisComp.layer(“Main Hinge”).transform.position[2]

    to give you a bit of control for the starting value of the rotation…

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Eric Goldstein

    April 15, 2009 at 5:55 pm

    Thanks,Kevin

    I just hit on this before I read your post:
    ((thisComp.layer(“Main Hinge”).transform.position[2])*-1)

    but a negative sign before the expression is nicer.

    Thanks,

    Eric

    Eric Goldstein
    Giraffe Film Company
    Los Angeles
    eric@giraffefilm.com

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