Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Make wiggle expression stop without “jumping”?

  • Make wiggle expression stop without “jumping”?

    Posted by David Horler on January 20, 2012 at 5:05 pm

    I have a small animation which relies on keyframing and a wiggler expression to move about 20 small circles around a screen. As they pass through a certain area, the circles should stop dead in their tracks.

    However, I haven’t worked out how to make the wiggler expression (which controls the anchor point) stop without it jumping back to it’s original anchor point of 250,250 (which creates an awful ‘jumping’ effect over the course of one or two frames).

    Example code:

    wiggleSpeed = transform.position.speed*100

    if (wiggleSpeed > 400) //just makes sure wiggle isnt too quick
    {
    wiggle(1.5,400);
    }

    else if (wiggleSpeed < 0.1) //stops wiggle

    {value;}

    else

    {wiggle(1.5 //slows wiggle as speed decreases
    ,wiggleSpeed);
    }

    Now this code looks rather complicated, but the same issue persists even if I use a really basic form. I think the problem is how it reacts with the Anchor Point when it stops.

    Roland R. kahlenberg replied 14 years, 7 months ago 3 Members · 4 Replies
  • 4 Replies
  • Erik Waluska

    January 20, 2012 at 6:11 pm

    Have you considered using an expression control slider to control the speed of the wiggle? That would give you manual control and you could ease into the stop position by keyframing, which may be smoother.

  • David Horler

    January 20, 2012 at 6:37 pm

    Thank you, that definitely works and solves my problem, although that is not an ideal solution as it will be time consuming to copy all that to my dozens of existing shapes. Ah well, time to crack on with it.

    Thanks again, if anybody has further ideas I would be happy to hear.

  • Erik Waluska

    January 20, 2012 at 7:03 pm

    If I understand what you are trying to do, you should be able to just create a “control” layer that holds the expression control slider and just link one of your layers wiggle speed to it and then, with the position value of the layer selected go to Edit>Copy Expression Only and select all of the other layers position values (select all of the layers and hit “P” to reveal position property and marquee select them all) and then paste. Then they will all be linked to that one controller.

  • Roland R. kahlenberg

    January 24, 2012 at 1:50 pm

    [David Horler] ” that is not an ideal solution as it will be time consuming to copy all that to my dozens of existing shapes”

    You should look into using the Copy Expression Only command found under the Edit Menu. Simply select the property with the Expression. Then select Edit>Copy Expression Only. Now select all the layers that should incorporate this new Expression and Paste (CTRL+V).

    Layers that have identical properties but with the old Expression will have their Expression script updated. Layers with identical properties but without an Expression will now contain the new Expression.

    HTH
    RoRK

    Intensive AE & Mocha Training in Singapore and Malaysia
    Adobe ACE/ACI (version 7) & Imagineer Systems Inc Approved Mocha Trainer

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