Copy link to clipboard
Copied
i want a layer to move from a specific point A to point B
and i want it to be controlled (parent) by a slider control, so when i key-frame the slide control to lets say 10 its at the end of the movement
and 0 is the begging of the movement
hope u understand
You would want to use a linear() expression. That should be enough to get you started in the right direction! Once you learn how to use it, it is very powerful. Have fun!
Copy link to clipboard
Copied
You would want to use a linear() expression. That should be enough to get you started in the right direction! Once you learn how to use it, it is very powerful. Have fun!
Copy link to clipboard
Copied
thank u, it is really helpful
but i'm still stuck
i wrote
x=thisComp.layer("Layer 19").transform.position[1];
faceMove=linear(x,-207,-197,0,10);
faceMove
the 207 and 197 is the location range
and 0-10 is my slider range
but the problem is that only when i changing the location values the slider values changes
but when i try to change the slide values, the software wont let me
Copy link to clipboard
Copied
What did you apply that expression to?
Copy link to clipboard
Copied
null object with a slider control
Copy link to clipboard
Copied
Okay. That's not how to do it. The expression needs to be applied to the value that you want to change.
Here is an example project: Linear to drive position with slider
(I don't know what version you are using, so I saved it back to version 12 of AE. If you need me to save it back to CS6, let me know.)
Copy link to clipboard
Copied
In the expression, I pointed the x value to be its own regular value (that's the value[0] part) and then the y is set to be the linear result. X and Y are an array, so they have to be displayed as [x,y]. Thus the value in x and the expression variable in y.
Copy link to clipboard
Copied
man, thank u so much! im still not controlling the expression 100 percent but i did succeed to do the thing i tried with your code, and i will work on it and learn it well. thanks!!!