Page 1 of 1

Ping pong movement between 2 layers

Posted: November 30th, 2007, 5:15 am
by mariohyeah
Hi, i havent a lot of idea about expressions, i have searched at aaaall internet (yes, all) but i havent answers. (my english is very poor too, sorry)
Any ideas (or complete solutions :P) to control the 3D position of a layer, moving between another 2 layers, moving then in 3d space too, in a lapse of X frames. The only thing i have find close to the solution was a "follow object" expression, but is based it frame delay...

any ideas..??¿???¿?

thanks

Posted: November 30th, 2007, 6:28 am
by Atomic

Posted: November 30th, 2007, 4:34 pm
by Dan Ebberts
I'm not sure if this is what you're after, but it might get you started. This position expression will cause a layer to move from "Layer 1" to "Layer 2" over the period that begins at 2 seconds and ends at 3 seconds:

L1 = thisComp.layer("Layer 1"); // layer where travel begins
L2 = thisComp.layer("Layer 2"); // layer where travel ends

t1 = 2; // start moving at 2 seconds
t2 = 3; // finish travel at 3 seconds

linear(time,t1,t2,L1.toWorld(L1.anchorPoint),L2.toWorld(L2.anchorPoint))

Dan