Copy link to clipboard
Copied
Hey guys!
I need to tile a layer.
For the effect I'm going for, I can't use repetile.
Duplicating by hand is too painful.
I've found this expression:
x = (index-1)*50;
[x,transform.position[1]];
It works for duplicating my layers (each one is 50x50px, so, perfect).
However, this only gets me a row of layers, right.
I'm sure there's a way to do this for the Y axis.
I've tried manually doing one column and then duplicating the layers, but that doesn't work because it shifts each layer 50px more on the X axis each time I duplicate...
You divide the index with the modulus:
(index-1) % numCols
This will return the index inside row and then you just need to multiply it with incremental indices per row. This is used in this old tutorial of Dan Ebberts:
http://www.motionscript.com/expressions-lab-ae65/random-grid-movement.html
You can easily find other examples for grids and tables using this technique in a simple web search.
Mylenium
Copy link to clipboard
Copied
You divide the index with the modulus:
(index-1) % numCols
This will return the index inside row and then you just need to multiply it with incremental indices per row. This is used in this old tutorial of Dan Ebberts:
http://www.motionscript.com/expressions-lab-ae65/random-grid-movement.html
You can easily find other examples for grids and tables using this technique in a simple web search.
Mylenium
Copy link to clipboard
Copied
Thank you!