I used no z position and just x & y maths even look inside! feel free to use his just give credit! arrow keys to move space to switch from cube to cuboid and cuboid to cube!
all @picake999