time*(slider value) trouble
Posted: January 20th, 2010, 11:58 am
I'm trying to parent the Y value of the Tile Center of a Motion Tile effect to a slider so it is constantly moving and I can easily change the speed of the movement with the slider.
Right now I have it set up like this:
It works fine if the speed is constant throughout the comp, but if I want to change the speed it doesn't work as I would like it to.
If on one frame the Slider is set to 350, and a few frames later it changes to 375... instead of making the movement gradually speed up and keep moving at that speed, it speeds up a lot while it changes to 375, and then slows down.
I understand why this is happening because 12.5*350=4375 while 12.5*375=4687.5. So when the slider changes it suddenly jumps to a much larger number. But 12.6*375=4725 so it slows back down after it reaches the keyframe I set in the slider.
So what I get is a rapid speed change faster as the slider animates, and then it slows back down after the slider reaches the new value at the next keyframe. What would I need to do to basically get the motion tile moving at say 5 pixels/sec, then move the slider to a new number and get the motion tile moving at say 10 pixels/sec, without the drastic speed up/slow down?
Right now I have it set up like this:
Code: Select all
x=effect("Motion Tile")("Tile Center")[0];
y=time*effect("speed")("Slider");
[x,y];
If on one frame the Slider is set to 350, and a few frames later it changes to 375... instead of making the movement gradually speed up and keep moving at that speed, it speeds up a lot while it changes to 375, and then slows down.
I understand why this is happening because 12.5*350=4375 while 12.5*375=4687.5. So when the slider changes it suddenly jumps to a much larger number. But 12.6*375=4725 so it slows back down after it reaches the keyframe I set in the slider.
So what I get is a rapid speed change faster as the slider animates, and then it slows back down after the slider reaches the new value at the next keyframe. What would I need to do to basically get the motion tile moving at say 5 pixels/sec, then move the slider to a new number and get the motion tile moving at say 10 pixels/sec, without the drastic speed up/slow down?