ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

X position move based on markers

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Olly Starkey
X position move based on markers
on Nov 25, 2019 at 3:43:00 pm

Hey 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
value

It's brilliant but I wonder how to add an easy ease into the motion.

Is this possible?

Thanks in advance


Return to posts index

Dan Ebberts
Re: X position move based on markers
on Nov 25, 2019 at 5:03:43 pm

Try 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



Return to posts index

Olly Starkey
Re: X position move based on markers
on Nov 25, 2019 at 5:25:14 pm

Of course! Thanks Dan, amazing.


Return to posts index

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