I want to sort 12 different "cubes", they are not really cubes more like objects, according to there size in x.
so from picture nr.1 to picture nr.2. I have started by putting my collection of cubes in a list, but where do I go from there?
edit: All I want is to have the objects sorted on the x-axis according to their x- length from smallest to largest. If you look at the images, the first image representing "before" and the second "after", the "skinniest" object will be placed first, and replace the cube that was there from the start. That is all I want, just for them to be sorted according to size, like the second image. I apologise for being unclear, this is all very very new to me and I honestly don't know really how to articulate any better. Thanks.