I have 3 rectangles being rendered here. Let’s say i wanted to move them all above the line yet keep their order, how would i go about that? I tried subtracting the Y and height rather than adding the Y it but as expected, the lower rectangle goes at the top, middle stays in the middle and top goes to the bottom
before:
z http://screensnapr.com/e/Lljb6S.png
after:
z http://screensnapr.com/e/EgWID2.png
So is there any simple solution to render them just above rather than having to change all values ?
You just want your boxes to stay over the X-axis, then you need to elevate all of them by the sum of all heights, plus the distance between blue box and the axis [being this
blueBox.y].So with a bit of pseudocode:
The key is that you can’t state the position of the single box without referring to the others – you need that sum.