I can’t picture exactly what you’re after, but this should help. Say you have a bunch of 3D solids, arranged left to right with edges just touching. You move each anchor point to the left edge of the solid. Starting on the left, you make each solid the parent of the one to its right. You then apply this expression to the y rotation property of the second solid from the left:
-2*parent.transform.yRotation
All the others (except the left-most, which has no expression) get this expression:
-parent.transform.yRotation
Then as you adjust the y rotation of the left-most solid, the others will do the accordion thing.
Dan