FORUMS: list search recent posts

Ebberts Random Motion flip position

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jason Jantzen
Ebberts Random Motion flip position
on Nov 10, 2015 at 2:02:50 am

I can't for the life of me figure out how to flip the random motion from X position to Y position motion. Anybody know how this works?

Here's the code from Dan's site
segMin = .3; //minimum segment duration
segMax = .7; //maximum segment duration
minVal = 0;
maxVal = thisComp.width;

end = 0;
j = 0;
while ( time >= end){
j += 1;
seedRandom(j,true);
start = end;
end += random(segMin,segMax);
}
endVal = random(minVal,maxVal);
seedRandom(j-1,true);
dummy=random(); //this is a throw-away value
startVal = random(minVal,maxVal);
y = position[1];
ease(time,start,end,[startVal,y],[endVal,y])


Jason Jantzen
vimeo.com/jasonj


Return to posts index


Dan Ebberts
Re: Ebberts Random Motion flip position
on Nov 10, 2015 at 4:37:18 am

This should switch it to y:


segMin = .3; //minimum segment duration
segMax = .7; //maximum segment duration
minVal = 0;
maxVal = thisComp.height;

end = 0;
j = 0;
while ( time >= end){
j += 1;
seedRandom(j,true);
start = end;
end += random(segMin,segMax);
}
endVal = random(minVal,maxVal);
seedRandom(j-1,true);
dummy=random(); //this is a throw-away value
startVal = random(minVal,maxVal);
x = position[0];
ease(time,start,end,[x,startVal],[x,endVal])



Dan



Return to posts index

Jason Jantzen
Re: Ebberts Random Motion flip position
on Nov 10, 2015 at 4:41:16 pm

Aha! I see now. It's just the last two lines that change. I didn't think about the ease expression values.

Thanks Dan!

Jason Jantzen
vimeo.com/jasonj


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]