-
Arm Rotate with Sleeve Rotate Delayed
Hi.
I have been trying to create an arm rotation expression where;
as the arm appears to hit the sleeve in either direction, the sleeve only then begins to rotate with it.
I have 2 layers ARM and SLEEVE – the arm rotating left hits the sleeve at +9 and going right hits the sleeve at -13.
So I needed an expression for the SLEEVE layer to say “begin rotating with the ARM layer beyond +9 and beyond -13 (minus the difference so the sleeve doesn’t jump) and in between those values, to keep its rotation at zero.I was using all kinds of if/else combinations and was getting nowhere, it would only work on one side at a time, but I got this purely by accident as I am only learning the expressions and can’t fully explain how its working and hope it’s a good code… but somebody else might find it useful.
var r = thisComp.layer(“ARM”).transform.rotation;
if(r>9){
thisComp.layer(“ARM”).transform.rotation-9;
}else{
0;
};
if(r<-13){ thisComp.layer("ARM").transform.rotation+13; };
Sorry, there were no replies found.