Skip to main content
ali22423757kaws
Participant
December 28, 2021
Question

Rotate Something Every 10 Seconds

  • December 28, 2021
  • 2 replies
  • 1243 views

I would like to rotate something, every 10 seconds and every Each rotate has a duration of 2 seconds. How do I add the 10 sec variable to a loop expression? I assume AE can do this, I'd prefer not to keyframe it. Thank You For Help.

This topic has been closed for replies.

2 replies

Jose Panadero
Community Expert
Community Expert
December 29, 2021

You need to animate the rotation with at least 2 keyframes. Then use this expression in the rotation parameter

 

loopOutDuration(type = "offset", duration = 10)

 

The vale 10 will represent when the cycle will repeat (every 10 seconds). Offset will continue the rotation in an additive way. If you want the cycle to repeat form the start change "offset" for "cycle"

Dan Ebberts
Community Expert
Community Expert
December 28, 2021

How much are you rotating each time? Is it cumulative, or does it start over each time? Does the 10 seconds include the 2 seconds?

ali22423757kaws
Participant
December 29, 2021

Rotate once or twice at a time, not including ten seconds. That is, after 10 seconds, the object rotates for two seconds or one second. Could I get what I mean?

Dan Ebberts
Community Expert
Community Expert
December 29, 2021

I don't think this is exactly what you're asking for, but it might get you started. No keyframes required.

holdTime = 10;
rotateTime = 2;

period = holdTime+rotateTime;
t = (time - inPoint)%period;
startVal = Math.floor((time - inPoint)/period)*360;
linear(t,holdTime,period,startVal,startVal + 360)