Forums › Adobe After Effects Expressions › X position move based on markers
X position move based on markers
Olly Starkey
November 25, 2019 at 3:43 pmHey all
Dan Ebberts wrote this expression last year.
m = marker;
moveTime = .5;
moveAmt = 1734;
n = 0;
if (m.numKeys > 0){
n = m.nearestKey(time).index;
if (time < m.key(n).time) n–;
}
if (n > 0){
t = time – m.key(n).time;
x = (n-1)*moveAmt + linear(t,0,moveTime,0,moveAmt);
value + [x,0]
}else
valueIt’s brilliant but I wonder how to add an easy ease into the motion.
Is this possible?
Thanks in advance
Dan Ebberts
November 25, 2019 at 5:03 pmTry changing this line:
x = (n-1)*moveAmt + linear(t,0,moveTime,0,moveAmt);
to this:
x = (n-1)*moveAmt + ease(t,0,moveTime,0,moveAmt);
Dan
Olly Starkey
November 25, 2019 at 5:25 pmOf course! Thanks Dan, amazing.
Viewing 1 - 3 of 3 posts
Log in to reply.