FORUMS: list search recent posts

Layer rotation linked to layer's position and speed

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Shirak Agresta
Layer rotation linked to layer's position and speed
on Aug 9, 2012 at 6:00:27 pm

So, years ago I had a similar question and Dan Ebberts answered it, but I can't find the expression and I don't have the AE project anymore. So let's try this again...

Imagine you've got a piece of fabric attached to the end of a pole (like a streamer). When you move the pole to your left the streamer flows (is blown by wind, whatever) out to the right and vice/versa (trailing behind the movement and speed of the end of the pole). Everyone with me so far?

So when layer A moves left or right, layer B "flows" behind it, affecting it's rotation to do so (its anchor point attached somewhere on layer A).

When layer A comes to a stop, layer B, would rotate back down to 0 (or whatever it's "resting" rotation value is). Ideally it would ease back in to that "resting" rotation.

The faster layer A moved, the quicker layer B would "flow" up in it's rotation (maybe with a little wiggling as if a breeze for good measure)

Does this make sense?

What would be the best way to do this? I've got a lot of little pieces and I'm hoping not to animate it all by hand.

Thanks,
Shirak

Julius Caesar and the Roman Empire couldn't conquer the blue sky.


Return to posts index

Nikolya Gousteau
Re: Layer rotation linked to layer's position and speed
on Aug 19, 2012 at 11:21:03 am

When the flag follows the pole, the orientation of the flag depends on the velocity of the pole. To achieve this with expression, you can use the expression attached below for the Orientation property.

Maybe this is only a small part of what you need, but hope it helps.

Here is a link to the project file:
4551_flag.aep.zip

nextPosition=position.valueAtTime(time+thisComp.frameDuration);
v=nextPosition-position; // velocity
lookAt(position,position-v)


Return to posts index

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