hello guys,
I often use one of the floowing Dan Ebbert script,
freq = 1.0; //oscillations per second
amplitude = 50;
decay = 0.7;
amplitude*Math.sin(freq*time*2*Math.PI)/Math.exp(decay*time)
but my problem is, how do i control this in time. If i apply this to the rotation property it seems always to begin since the beginning of the comp no matter what i try. What if i want this effects to begin after, 5 seconds for exemple.
Is there some code to add ? or something to tune ?
Thanks for your sharing your knowledge
detomaso
Time question
-
- Posts: 320
- Joined: June 26th, 2004, 10:01 am
- Location: Folsom, CA
- Contact:
Sure, like this:
freq = 1.0; //oscillations per second
amplitude = 50;
decay = 0.7;
timeToStart = 5; // start time (seconds)
t = Math.max( time - timeToStart,0);
amplitude*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t)
Dan
freq = 1.0; //oscillations per second
amplitude = 50;
decay = 0.7;
timeToStart = 5; // start time (seconds)
t = Math.max( time - timeToStart,0);
amplitude*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t)
Dan
Thanks a lot Dan.Dan Ebberts wrote:Sure, like this:
freq = 1.0; //oscillations per second
amplitude = 50;
decay = 0.7;
timeToStart = 5; // start time (seconds)
t = Math.max( time - timeToStart,0);
amplitude*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t)
Dan
Works perfect