Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions clamp existing wiggle expression

  • clamp existing wiggle expression

    Posted by Ryan Hagen on September 14, 2018 at 3:03 pm

    Here’s the expression im using, I have a Null with expression sliders driving the wiggle, just want to clamp the value so it doesn’t go into negative values, i’m just not sure how to alter the expression to do this. Thanks in advance for any help.

    w = wiggle(thisComp.layer("Master_ct").effect("PerSec")("Slider"),thisComp.layer("Master_ct").effect("Amt")("Slider"));
    [w[0],[29.9]]

    Ryan Hagen replied 7 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Kalleheikki Kannisto

    September 14, 2018 at 3:48 pm

    I believe the second line would be
    [Math.max(w[0],0), 29.9]

    Note that you don’t use brackets on the second value, brackets are used to create or read an array.

    Kalleheikki Kannisto
    Senior Graphic Designer

  • Ryan Hagen

    September 14, 2018 at 3:54 pm

    That worked, thank you very much Kalleheikki. Also thank you for helping me to understand the bracket usage.

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