Question
Rotate the Shortest Direction?
Hi,
Trying to slider ease between 2 rotation values, what do I need to do to this script to make the 2D layer always rotate the shortest direction?
var total = 0, totalWeight = 0, remWeight = 0;
var rot = thisComp.layer("Target").transform.rotation);
if (hasParent) rot = parent.rotation;
var fade = effect("Slider Control")("Slider");
total += fade*pos;
totalWeight += fade;
remWeight = 1 - totalWeight;
totalWeight==0 ? value : linear(remWeight,total/totalWeight,value);
