I was wondering if there is a way to do something that I’m trying to do for a while, but didn’t found the answer.
What I want to do is to take a layer and basically based on the layer index the rotation of the layer to change for example with 5, 10 or whatever amount of degrees I want. I tried the following one:
Value + index + 5 for example, but doesn’t work at all
it takes the index for example 1 and adds 5 to it and it becomes a 6, and when I duplicate the layer the next copy is offset with only 1 degree, because index 2 + 5 is 7 etc.. So I can’t figure out a way to do that. Another thing I was wondering if possible to do is to make a text layer for example and when I duplicate the layer it I want it to offset with a certain amount of degrees that I can change any time in the expression and make the text to display its current degree number.
Hope some of you are better with expressions than me and can help me solve this problem 
Regarding your first question try this: (Value + Index) * 5. That way first layer will be (1 + 1) * 5 = 10; seconds layer (1 + 2) * 5 = 15; third (1 + 3) * 5 = 20 etc
Of course your first layer will have 10 instead of 5, so you might do this trick ( Value + (Index - 1)) * 5.
Hope that helps.
Regarding your seconds question, sorry I didn’t get it.
- Community Moderator
- Sold between 50 000 and 100 000 dollars
- Author was Featured
- Item was Featured
- Author had a File in an Envato Bundle
- Beta Tester
- Has been a member for 4-5 years
- United Kingdom
Multiply!!
On rotation property:tIncrement = 10; //number of degrees to increment per layer tIndex = thisLayer.index; tStartIndex = 5; //the layer index you want to have a rotation of 0 tRotation = (tIndex-tStartIndex)*tIncrement;On source text property:
thisLayer.text.sourceText = thisLayer.transform.rotation.value.toString() + " degrees";
rendertom thank you very much! This work really well and it is super simple! 
Regarding my second question. I basically wanted to make the text layer to display the degree number, but after your help I figured out that I can link the source text to the rotation and this way it will display the rotation degree value. Thank you so much for your help!
EDIT :
Thanks felt! Very helpful, a bit more complex than the previous example, but guess more flexible. thanks again for the great help! You’re awesome 
