Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions slider for a bouncing ball

  • slider for a bouncing ball

    Posted by Kari Pieskä on June 11, 2013 at 12:11 pm

    I want to make a slider that controls x and y to separate dimension. So I can make a manual slider for squash and strech. I thought it would be easy with the code I made, but turns out it didn’t work the way I imagined.
    I found a lot of text in the motionscript.com, also from creative cow, but everything seemed too complex and was somehow connected to simulating the bounce.

    It should be fairly simple, no?

    In a different project I made a null that controls multiple layer positions at different speeds, so I thought I’d try something similar.

    But it feels that there is a part missing from my logic here, and I can’t seem to catch it.

    Any advice?

    tempx = effect("Slider Control")("Slider");
    tempy = effect("Slider Control")("Slider")*-1;
    [tempx, tempy]

    Kari Pieskä replied 13 years, 1 month ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    June 11, 2013 at 2:05 pm

    Maybe something like this:

    x = effect(“Slider Control”)(“Slider”);
    y = 10000/x;
    [x,y]

    The expression break if you set the slider to zero. You could put some code in to defend against that if it’s an issue.

    Dan

  • Kari Pieskä

    June 11, 2013 at 8:10 pm

    Thats a good, clean and simple solution. I see now that my idea was changing the scale value to -100. But it was supposed to come down from 100 while the other goes up.
    To the 0 problem I’ll just limit the slider between 80 and 150. That’ll work for now.

    Thank you, that was a good forward nudge!

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