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
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
Copy link to clipboard
Copied
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.(