FORUMS: list search recent posts

Move Layer on Angle

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mark Walczak
Move Layer on Angle
on Nov 12, 2014 at 4:53:46 pm

Hi everyone,

I'm sure Dan knows the immediate answer to this, but just in case someone wants to try beating him to the punch, here's what I'm trying to achieve:

I need a simple way of moving a layer on an angle. Essentially, I'd like to have two sliders on a footage layer: one for X-position, and one for angle. As I set keyframes and animate the X-position of a layer, I would like the Y-position to automatically increase/decrease in a way that makes the layer appear to be sliding on the defined angle. I've tried rigging my own solution by using the tangent of a given angle, but that didn't seem to work.

Any and all help would be appreciated.

Thank you!

http://vimeo.com/explosivegraffix


Return to posts index

Dan Ebberts
Re: Move Layer on Angle
on Nov 12, 2014 at 7:25:29 pm

Will you be animating the angle? If so, that's a much more complicated expression because you'll need to calculate where the layer was at each of the previous keyframes.


Dan



Return to posts index

Mark Walczak
Re: Move Layer on Angle
on Nov 12, 2014 at 7:43:32 pm

Hi Dan,

No, it would be great for the angle to be constant. No animation needed :-)

Thank you!

http://vimeo.com/explosivegraffix


Return to posts index


Dan Ebberts
Re: Move Layer on Angle
on Nov 12, 2014 at 8:32:07 pm

Play around with this and see if it's close:

x = effect("x")("Slider");
a = effect("angle")("Slider");
y = -x*Math.tan(degreesToRadians(a));
value + [x,y]


Dan



Return to posts index

Prakash Gaygaye
Re: Move Layer on Angle
on Nov 12, 2014 at 11:31:25 pm

bounce

prakash123


Return to posts index

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