FORUMS: list search recent posts

Move object between 3 different positions using slider control.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Benjamin Taylor-Day
Move object between 3 different positions using slider control.
on Jul 4, 2013 at 7:20:13 pm

Im currently working on an animation which includes having the characters ears go up and down depending on his expressions (happy/ sad etc).

Ive currently managed to link both ears to a single slider that will move the ears up and down between 2 points: A: [2243.0,324.6] and B [2342.8,582.0], the code im using for this is:

S=thisComp.layer("Null 2").effect("Slider Control")("Slider");
A= [2243,324.6];
B= [2342.8,582];
linear(S,0,100,A,B)

However i want to insert a 3rd point so when the slider is at 50 (half way) the ear will be at [2366.9,501.6].

The code i tried was:

S=thisComp.layer("Null 2").effect("Slider Control")("Slider");
A= [2243,324.6];
B= [2366.9,501.6];
C= [2342.8,582];
linear(S,0,100,A,B,C)

But as i dont really understand what im saying there its not too surprising that the code didnt work.

Anyhelp at all would be very grateful. Thanks :)


Return to posts index

Dan Ebberts
Re: Move object between 3 different positions using slider control.
on Jul 4, 2013 at 8:49:56 pm

Try it this way:

S=thisComp.layer("Null 2").effect("Slider Control")("Slider");
A= [2243,324.6];
B= [2366.9,501.6];
C= [2342.8,582];
if (S < 50)
linear(S,0,50,A,B)
else
linear(S,50,100,B,C)


Dan



Return to posts index

Benjamin Taylor-Day
Re: Move object between 3 different positions using slider control.
on Jul 4, 2013 at 9:14:40 pm

It works!!! Yaaaaaaay!

Just to get my head around this for future reference...

Your basically telling AE that when the slider is below 50 then make the scale 0-50 with points A and B at each end. When the slider is above 50 then the scale is 50-100 with points B and C at each end? When you put it that way its really simple!

Thanks so much :)


Return to posts index


Dan Ebberts
Re: Move object between 3 different positions using slider control.
on Jul 4, 2013 at 9:24:08 pm

I think you've got it.

Dan



Return to posts index

Mitch Mann
Re: Move object between 3 different positions using slider control.
on Jul 8, 2013 at 1:49:32 pm

... Or the poor man's way:
Animate it between 3 points in a preComp, then have the slider control the time remap.


Return to posts index

Mike roberts
Re: Move object between 3 different positions using slider control.
on Jan 28, 2015 at 11:52:59 pm

Hey! any idea how to add a fourth variable?


Return to posts index

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