ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

clamp existing wiggle expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ryan Hagen
clamp existing wiggle expression
on Sep 14, 2018 at 3:03:49 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]]


Return to posts index

Kalleheikki Kannisto
Re: clamp existing wiggle expression
on Sep 14, 2018 at 3:48:15 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


Return to posts index

Ryan Hagen
Re: clamp existing wiggle expression
on Sep 14, 2018 at 3:54:16 pm

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


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]