FORUMS: list search recent posts

if/then and index to create opposing rotation per layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Brandon McFarland
if/then and index to create opposing rotation per layer
on Jan 24, 2011 at 10:30:57 pm

I'm trying to have every other layer start it's rotation at 90 and -90 and then ease into it's initial value. The way I have it written now seems to disregard index values and just bases it off of what I enter into the line
"n=index-90"

Thanks,
Brandon

start =
n=index-90;
i=(index%2)-n;
if (i=1){ n=90 }else{ n=-90};
end = value;

ease(time, 0, 2 + (index*thisComp.frameDuration), start, end)


Return to posts index

Dan Ebberts
Re: if/then and index to create opposing rotation per layer
on Jan 24, 2011 at 11:31:20 pm

Try this (you might have to switch the -1 and 1):

startVal = 90*(index%2 ? -1 : 1);
ease(time,0,2 + index*thisComp.frameDuration,startVal,value)


Dan



Return to posts index

Brandon McFarland
Re: if/then and index to create opposing rotation per layer
on Jan 24, 2011 at 11:47:45 pm

Awesome! That works perfectly.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]