• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Start and stop a wiggle at intervels on same layer

Guest
Apr 17, 2009 Apr 17, 2009

Copy link to clipboard

Copied

I have a dot that fly's around my comp. When it stops it wiggles and buzzes and then stops wiggling. I need it to move on to the next spot and then wiggle again. Then onto the next spot and repeat. I am able to do this wiggle or buzz once but I don't know how to make it continue at each stopping point. Any help would be great.

Thank you

TOPICS
Expressions

Views

2.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 17, 2009 Apr 17, 2009

Copy link to clipboard

Copied

There are a bunch of ways to do this. This one assumes that the layer stops at each even-numbered keyframe:

dur = 1; // total wiggle duration (sec)
ramp = .1;// time to ramp int0/out of wiggle
freq = 3; // wiggle frequency
amp = 50; // wiggle amplitude;

n = 0;
if (numKeys > 0){
  n = nearestKey(time).index;
    if (key(n).time > time){
      n--;
    }
}


if (n > 0 && (n%2 == 0)){
  t = time - key(n).time
  w = wiggle(freq,amp);
  if (t < ramp){
    linear(t,0,ramp,value,w)
  }else{
    linear(t,dur-ramp,dur,w,value)
  }
}else{
  value
}

Dan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 17, 2009 Apr 17, 2009

Copy link to clipboard

Copied

LATEST

Ok this is great if you have any idea how this code stuff works. I don't I am new and I found what I needed for the one time wiggle on the net. I figured out which settings I needed to modify by trail and error, but there is to much here for me to figure out. I am sorry I just don't understand.(

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines