Activity › Forums › Adobe After Effects Expressions › Trying to animate only y possition with an expression
-
Trying to animate only y possition with an expression
Patrick Oneill replied 8 years, 2 months ago 6 Members · 12 Replies
-
Matt Silverman
June 12, 2006 at 7:28 pmAnother solution would be to use the Transform animation preset in AE7 for “Seperate X/Y/Z”. This will make you an effect with three sliders for x/y/z. Then you can link your expression to just the y slider.
-Matt
-
Patrick Oneill
March 8, 2018 at 3:09 amCame across this old thread and posting for other who come across it.
Select the layer you want to link to another layer
Press ALT+SHIFT+= to bring up the expression
For position, you’ll see something like thisComp.layer(“LAYER NAME”).transform.position pop up. This affects BOTH axis.As Steve said,
position[0] = X
position[1] = Y
position[2] = ZSo, add “position[0]” to the front or “position [1]” to the back of the expression to affect only one axis.
For example, this will affect ONLY the X axis:
[thisComp.layer(“LAYER NAME”).transform.position[0],position[1]]
And this will affect ONLY the Y axis:
[position[0],thisComp.layer(“LAYER NAME”).transform.position[1]]Hope that helps.
Reply to this Discussion! Login or Sign Up