Copy link to clipboard
Copied
Hi everyone!
How can I use the linear function to create a looping motion? So I can control the length of multiple loops in multiple compositions with just one slider value?
I've tried using the modulus operator as:
linear(time, time%1, time%2, 100, 50);
But I can't get this working.
How Is this easiest achieved?
This should do the trick:
linstart = effect("Einstellungen für Schieberegler")("Schieberegler");
linduration = effect("Einstellungen für Schieberegler 2")("Schieberegler");
linend = linstart + linduration;
loop = time%linend;
x = linear(loop, linstart, linend, 100, 50);
[x, value[1]];
Moves an object in x-coordinate from 100 to 50, starting at the value in seconds of the first slider, with the duration of the value in seconds of the second slider and repeating this over and over again. If you set up s
...Copy link to clipboard
Copied
What is it you're trying to loop exactly? More what you're trying to do rather than how you're trying to do it.
Dan
Copy link to clipboard
Copied
Hey Dan!
I'm trying to create a loop out of a Y position animation on one layer. That same movement should then be applied to other compositions.
Do you understand?
Copy link to clipboard
Copied
Not really. Sorry.
Dan
Copy link to clipboard
Copied
This should do the trick:
linstart = effect("Einstellungen für Schieberegler")("Schieberegler");
linduration = effect("Einstellungen für Schieberegler 2")("Schieberegler");
linend = linstart + linduration;
loop = time%linend;
x = linear(loop, linstart, linend, 100, 50);
[x, value[1]];
Moves an object in x-coordinate from 100 to 50, starting at the value in seconds of the first slider, with the duration of the value in seconds of the second slider and repeating this over and over again. If you set up slider 1 to 0, the movement is repeated right after it ends. If you set it up to 2, there is a 2 second break between the movements.
Cheers,
Martin
Copy link to clipboard
Copied
Of course I can't drive the entire animation with the time value. This solves so much for me - exactly what I was looking for.
Thank you!
Copy link to clipboard
Copied
If you want a loop where you want to dynamically control which time-span of a keyframed property should be looped, you can use the loop expression from iExpressions and simply link the "custom start frame" and "custom end frame" to two sliders to control which region should be keyframed.
You have to purchase iExpressions, but the loop iExpression is in the Movement Modifier Bundle which is just $9.99.
Cheers,
Mathias