In this case the cubes’ center will always be at y=0, and after applying the scaling, they will be scaled equally towards the negative and positive y values. To fix this, you should set the coordinate, so that ycoord = (scale / 2)