Hey vvvvellows!

Quick question. I want to create a 2d matrix out of quads. So far, so easy - since I could just use a LinearSpread and a Cross (2d) Node.

But I want the quads in my matrix to have different widths. To be more specific - I want to use two different widths where the bigger quads are twice as long as the small ones.

If I am not mistaken I cannot use the LinearSpread + Cross (2d) combination anymore and I have to write my own matrix logic. In it I have to check how many quads fit in one row based on:

- The length of each quad and
- the estimated grid width

Scenario:

Let’s assume I have a spread of six quads and one row in my matrix can hold exactly six small quads. Now if, for example, the first out of those six quads is twice as large as the other ones I would have to push the last quad of my spread into the next row because the first quad already needs the space of two small ones. And therefore I can only place four small ones into the same row before I move on to the next row…

While this is a very simple example it is worth noticing that I want to deal with a fairly larger and variable spread size in my actual project.

Does anyone have an idea how I could solve that?

Cheers,

dl-110