ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Linking Velocity to Slider

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Alex Ross
Linking Velocity to Slider
on Jul 17, 2019 at 4:06:23 am

Hi, I was using this tutorial to make a squash and stretch effect, I wanted to try and link the velocity of the moving layer to the scale width.

I think I have everything right, and the numbers shown look around where they should be, but the expression has stopped any scaling effect that I had applied. Now it wont register the scale effect at all.

Any help would be great.

velocity = thisLayer.transform.position.velocity;
angleInRadians = Math.atan2(velocity[1], velocity[0]);
angleInDegrees = 180 * angleInRadians / Math.PI +100;

This is the effect I have on a Slider controlling my scale width.



Return to posts index

Andrei Popa
Re: Linking Velocity to Slider
on Jul 17, 2019 at 10:49:00 am

If you want to also consider the actual value of the property, you must add it. So the last line should be "value + " whatever you have there.

Andrei
My Envato portfolio.


Return to posts index

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