Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Wiggle Expression – get another layer to wiggle one frame after

  • Wiggle Expression – get another layer to wiggle one frame after

    Posted by Kevin Tosi on September 10, 2020 at 10:35 pm

    I’m rigging a character and would like his torso Rotation to wiggle slightly. To do this, I have the expression with Posterize Time and Wiggle:

    //wiggle posterize time

    posterizeTime(f);

    wiggle(f,a);


    In my animation I like to have the head rotate slightly one frame after the torso rotates for a smoother body motion. 

    But with this posterize time/ wiggle expression, I can’t seem to figure out how to get the head to wiggle one frame after the torso does. Any thoughts? 

    Essentially what that expression above is doing, is giving me a random value every (f) frames. 

    I’ve tried just doing (f+1) but it’s not rotating the head one frame after the torso. 

    My comp is at 23.976 fps if that helps. 

    Thank you in advance for any help!!

    Kevin Tosi replied 5 years, 6 months ago 2 Members · 4 Replies
  • 4 Replies
  • Filip Vandueren

    September 11, 2020 at 9:43 am

    Give the head’s rotation this expression:

    thisComp.layer("torso").transform.rotation.valueAtTime(time - thisComp.frameDuration);

  • Kevin Tosi

    September 11, 2020 at 4:22 pm

    Thanks Filip!

  • Kevin Tosi

    November 6, 2020 at 10:15 pm

    First of all – thanks again for this! Another question – so I’ve added slider controls to this expression so I can keyframe when it goes on and when it doesn’t.

    But once I add the expression – even if my slider controls are set to 0, I can’t rotate the object anymore manually. Do you know if there’s a way to temporarily disable an expression using keyframes?

  • Kevin Tosi

    November 6, 2020 at 10:23 pm

    Never mind I was able to just do an amazing thing called Googling haha

    For anyone looking for something similar – you can use Checkbox Controls. Below is the evolved expression – just add 2 slider controls and a Checkbox control to your layer and add this expression

    control = effect("Checkbox Control")("Checkbox");
    if (control == 1){
    posterizeTime(effect("Slider Control")("Slider"));
    wiggle((effect("Slider Control")("Slider")), effect("Slider Control 2")("Slider"));
    }else{
    value;
    }

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