ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Setting Y maximum to a moving text

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
michele cazzaniga
Setting Y maximum to a moving text
on Jan 24, 2019 at 11:37:48 am

Hi guys,
I'm trying to create a falling text using an animation based on position and with the expression below (following a youtube tutorial).
I would like to know if there is a way to allow characters to go only over my ending "land line", like setting a max value of the "y" position.
Thank you very much

delay = .1; myDelay = delay*textIndex;t = (time - inPoint) - myDelay; if (t >= 0) {freq =3; amplitude = 50; decay = 12.0; s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);[s,s]}else {value}


Return to posts index

Kalleheikki Kannisto
Re: Setting Y maximum to a moving text
on Jan 25, 2019 at 7:01:51 pm

I'm not understanding your question. The final position is where you set it, which would be your "land line" and the position animator y offset amount is how far up it starts. What are you trying to do differently from that? Are you trying to limit how far up the letters can go?

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

michele cazzaniga
Re: Setting Y maximum to a moving text
on Jan 26, 2019 at 5:16:45 pm

Thanks to the expression (freq =3; amplitude = 50; decay = 12.0) the letters jump a little bit above and below the "land line" before stopping in their final position.
I would like that the letters jump only above the "land line" before stopping, maybe like setting a maximum amount that the y value should have.
Sorry for the not clear question.


Return to posts index


Kalleheikki Kannisto
Re: Setting Y maximum to a moving text
on Jan 27, 2019 at 10:02:33 am

Ok, I see now. You're talking about bouncing instead of overshooting. I think if you change the line that calculates the value of "s" to this, it should do it. (If this goes in the wrong direction, then put a minus in front of amplitude.)

s = amplitude*Math.abs(Math.cos(freq*t*2*Math.PI))/Math.exp(decay*t);

Math.abs gives the absolute value, i.e. it removes the minus from negative values.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

michele cazzaniga
Re: Setting Y maximum to a moving text
on Jan 28, 2019 at 1:38:32 am

Now it really works!
Thank you very much for your great help!


Return to posts index

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