-
Pause and resume position wiggle while keeping its place
Starting and stopping a position wiggle using an if/else statement is not a problem, and has been answered in this forum before (see the code below). But that will make the position jump to its original value when the wiggle stops, instead of pausing its current wiggle value, and then resuming from that value.
I can imagine doing this in a couple ways that involve either…
1) Precomposing the layer with the wiggle expression, and then using a Time Remap to pause and resume it
Or…
2) Using a slider control with a wiggle expression, and then adding an expression on the Position property that links to the slider control and adds a valueAtTime() function.
However, I’m really hoping to do this all in one expression. Ideally, the pausing/resuming should be random (for example, wiggling for a maximum of 5 seconds, then stopping for a maximum of 5 seconds). It’d be cool if the position could pause over the course of a few frames, so that it slows down to a stop, and then speeds up as it resumes, but that’s not essential – I would be happy if it just stops dead in its tracks. I appreciate all you expression geniuses (Dan) and your help. Thanks in advance!timeToStart = 2;
timeToStop = 2.5;
timeToStartOne = 5;
timeToStopOne = 5.5;if ((time > timeToStart) && (time < timeToStop)){
wiggle(4,300);
}else if ((time > timeToStartOne) && (time < timeToStopOne)){
wiggle(4,300);
}else{
value;
}Creation Effects – Creative tools for After Effects: https://CreationEffects.com