Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Having Trouble With A Parenting Situation

  • Having Trouble With A Parenting Situation

    Posted by Filippo Marchetti on June 28, 2016 at 8:59 pm

    Hello; sorry for the slightly weird title but i have no other way to describe my issue and i need to solve it immediately.
    I am trying to animate the pedals of a bike rotating, but i’m having some trouble with the parenting.
    I’m trying to parent the pedal’s position to the pedal’s rotating axis (the metal tube), but if i try to do that the pedal snaps to the tube’s anchor point, which of course is not good.
    The problem is rather hard to describe, so i have shot a quick video showcasing it.
    How can i keep the position parenting while having the pedal in the correct position?
    Thanks.

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Vimeo framework” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

    thisComp.layer("Front Pedal Bar Outlines").transform.position

    https://vimeo.com/revandesign

    Dan Ebberts replied 10 years, 2 months ago 2 Members · 6 Replies
  • 6 Replies
  • Dan Ebberts

    June 28, 2016 at 9:31 pm

    Why are you using an expression for position rather than actually parenting the layer? I think I would parent the layer, then add a rotation expression to keep the pedal level.

    Dan

  • Filippo Marchetti

    June 29, 2016 at 1:35 am

    Thanks, would you kindly explain me how to do that? I’m not really into expressions.
    By the way is it possible there isn’t a quick way to parent only one propriety? Thanks.

    https://vimeo.com/studiomarchetti

  • Dan Ebberts

    June 29, 2016 at 6:50 am

    If the pedal is parented to the shaft, and you rotate the shaft, the expression to counter-rotate the pedal might be as simple as this:

    value -parent.rotation

    You might need to add an offset, depending on how you have things set up.

    Dan

  • Filippo Marchetti

    June 29, 2016 at 3:24 pm

    Thanks, i’ll try and i’ll let you know.

    https://vimeo.com/studiomarchetti

  • Filippo Marchetti

    June 29, 2016 at 4:15 pm

    It worked; thanks.
    For the future, could you tell me how to lock other proprieties? Thanks.
    I really need to learn expressions, but i can’t find decent courses.

    https://vimeo.com/studiomarchetti

  • Dan Ebberts

    June 29, 2016 at 7:08 pm

    Another approach would be to create a null and parent it to the crank at the pedal’s attachment point. Then you could use this for the (unparented) pedal’s position:

    thisComp.layer(“Null 1”).toComp([0,0,0])

    and the pedal should stay horizontal as the crank rotates.

    Dan

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