about
Animate objects along a path with a handy offset slider, aligned rotation and seamless looping
preview
object: custom slider "COMPLETION %"
animate by hand or use progressive expressions like:
-- CODE language-js --
time*10;
object: position
-- CODE language-js --
completion = effect("COMPLETION (0-100%)")("ADBE Slider Control-0001")%100; // Reference the Completion Slider here
normOffset = effect("NORMAL OFFSET")("ADBE Slider Control-0001") // Reference the Normal Offset Slider here
refPath = parent.content("PATH_GROUP").content("PATH").path; // Reference the chosen Path here (has to be on the parent layer)
basePos = refPath.pointOnPath(completion/100,time)+value;
offsetVec = refPath.normalOnPath(completion/100,time)*normOffset;
[thisComp.width/2,thisComp.height/2] + basePos + offsetVec;
object: rotation
-- CODE language-js --
completion = effect("COMPLETION (0-100%)")("ADBE Slider Control-0001")%100;
refPath = parent.content("PATH_GROUP").content("PATH").path;
normVec = refPath.normalOnPath(completion/100,time);
radiansToDegrees(Math.atan2(normVec[1],normVec[0]));