Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Wiggle taking precalculated value as its starting point?

  • Wiggle taking precalculated value as its starting point?

    Posted by Blake Goulette on September 12, 2022 at 2:13 pm

    This has probably been answered elsewhere, but I’m probably not working my searches correctly. Here’s what I want to happen:

    I have a rotation value randomly assigned to a layer through other expressions. I want to add a wiggle expression that takes that precalculated rotation as its starting point and wiggles based on that, not the default rotation (which is always 0). Whenever I add the wiggle expression, it always uses the default (0 degrees) rotation, not what I’ve assigned it through expressions. Here’s what I’m doing that isn’t working:

    seedRandom(index, true);

    r = thisComp.layer("n. Global exp. controller").effect("Rotation multiplier")("Slider") * random(0, 359);

    wf = thisComp.layer("n. Global exp. controller").effect("Wiggle freq")("Slider");

    wa = thisComp.layer("n. Global exp. controller").effect("Wiggle amp")("Slider");

    transform.rotation = r;

    wiggle(wf, wa);

    Blake Goulette replied 3 years, 8 months ago 1 Member · 1 Reply
  • 1 Reply
  • Blake Goulette

    September 12, 2022 at 2:15 pm

    Never mind, I’m just mathematically challenged! All I had to do was add the wiggle result to the value assigned to “r” (above) and things behave as I want. Thanks for reading!

    (Changed my last line to this):

    transform.rotation = r + wiggle(wf, wa);

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