Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects A directional wiggle

  • A directional wiggle

    Posted by Erin Shelby on April 5, 2006 at 7:45 am

    I am trying to wiggle a layer but I only want the wiggle to move the layer on a diagonal (if it were a map I’d only want it to move from the SW to NW diagonal). I believe that would tranlate to only +Y and +X wiggles or -Y and -X wiggles. What I never want it to do is go in a -Y/+X direction or a +Y/-X direction. So this slash: “/” is the diagonal I’d like it to move along. Do I use the Math.abs function for this?

    Dan Ebberts replied 20 years, 1 month ago 3 Members · 2 Replies
  • 2 Replies
  • Mylenium

    April 5, 2006 at 8:50 am

    [echo] “Do I use the Math.abs function for this?”

    I wouldn’t because it could cause unwanted stuttering and flipping in your animation. The easiest way is to add a value to the wiggle (which would be the average point around which everything wiggles). Animate your layer and then ad the wiggle afterwards:

    my_wiggle=wiggle(3,5);

    X=position[0]+wiggle[0];
    Y=position[1]+wiggle[1];

    [X,Y]

    You can also further limit the values using clamp() or using conditional statments in combination with keyframe methods, something, I believe, you will find the code for in a posting not so long ago by someone else.

    Mylenium

    [Pour Myl

  • Dan Ebberts

    April 5, 2006 at 1:27 pm

    I think you’re looking for something like thsi:

    w = wiggle(5,25) – value;
    value + [w[0],-w[0]]

    Dan

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