Copy link to clipboard
Copied
Hi! I have a simple Expression on the rotation value of a layer. How do I write it so it's triggerd by the layer itself and not the comp it is in.
veloc = 5;
amplitude = 20;
decay = 3;
amplitude*Math.sin(veloc*time)/Math.exp(decay*time)
Thanx!
Finn, Sweden
Try it this way:
veloc = 5;
amplitude = 20;
decay = 3;
t = time - inPoint;
amplitude*Math.sin(veloc*t)/Math.exp(decay*t)
Dan
Copy link to clipboard
Copied
There is no such thing as layer-time. Time is always global.
What do you want to achieve?
If the decay should be less or more, you can simply multiply time.
You can also play around with poserizeTime() to simulate another framerate.
Cheers,
Martin
Copy link to clipboard
Copied
Sorry I'm a novice when it comes to expressions but I have a couple i use all the time. Yes I know how to manipulate the movement but the thing is if I apply it to a layer and have the layer start five seconds in to the timeline the movement generated from the expression is lost because it happens before the layer is even visible. I had a version of this expression with some extra code added to it before which made the expression trigger the motion when the layer it was applied to became visible. Unfortunately I lost it in a disc crash so now I want to re create it.
Copy link to clipboard
Copied
Try it this way:
veloc = 5;
amplitude = 20;
decay = 3;
t = time - inPoint;
amplitude*Math.sin(veloc*t)/Math.exp(decay*t)
Dan
Copy link to clipboard
Copied
You are THE MAN Dan!
Exelent!