Chapter 8
Randomness
Another Look at Wiggle()
Up to now, we’ve been using wiggle() to generate all of our random numbers. I’m a big wiggle() fan, but sometimes I need more control. For instance, what if I want to generate a random Rotation between 90 and 180 degrees? It’s hard to make wiggle() stay within a specific range. The range for wiggle() always starts with the property’s default value.
I could get what I want, but I’d have to first set Rotation to 0. Then, I’d have to apply the wiggle() Expression as follows (Chapter08.aep, Comp1):
135 + wiggle(1,45)
Starting from a default of 0, this Expression sets Rotation to 135 plus a random number. That random number could be any number from −45 to 45. If it’s negative 45, then the Expression resolves ...
Get After Effects Expressions now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.