How to individually transform members of an array

How can one go about creating a simple mesh array in the construction script and then being able to individually transform them via variables…The attached example works but not as individual meshes rather it bulks the array as one… Any ideas appreciated…thanks

Are you saying they all end up in one place? Is the array of transforms all different?

EDIT: Oh, sorry, wasn’t looking closely.

Get rid of that loop on the transform:

](filedata/fetch?id=1873157&d=1616342616)
( It’s because your code sets the position of all meshes to the last value in the transform array ).

As you can see I have added two meshes however when I use the transforms they get translated as one mesh…what I wish is to create an array and individually transform them…thx

( see the rest of my answer… )

OMG…thx I’ve been working on this for hours…it was driving me crazy!!!thx man!

After hooking it up I get doubles…any ideas?

If you quote me, I get a message, otherwise I have to noticed you replied manually :wink:

I’d try doing the loops with one foreach innermost.

No, wait, you want XxYxZ random meshes, right?

Then you only need the three int loops.

Your first part worked great…now I’m trying to clone all the array meshes and move them together(after I have adjusted them as per your workaround)…thats why I use the for loops x,y and z…it worked before but now its duplicating the meshes…what you are suggesting now is to drop the for each loop and use the for loops but that get rid of my array?

Can you give me a description of what you want to happen? I’m getting a bit confused with all these loops… :wink:

Short description would be fine. I mean you have random meshes, some transforms ( are they random? ), and you’re making a lot of meshes in a grid.

Anything else?

I wanted to individually transform the array (as u showed me) and then clone the whole group - the array - and transform as a group now…does this make sense?! This way I can adjust individual meshes but the I could control the whole group as well…

So make a whole grid of meshes, and then rotate that grid around a point. Something like that?

( or just apply the transform array to a mesh array AFTER it has been drawn? )

Probably the second one is the one I’m after…I’ll give it a go… …thanks for your help

Once you’ve placed them, you can change their transforms again with:

Ill give it a go…thx man!