Hello, when I understand right, you want a cube rolling over the floor. You will need a combination of transformations and a rotation.
1. Define 4 vectors from the center of cube to the midpoints of the lower edges, i.e. vecToFront, vecToLeft...
2. Transform the center of cube to the midpoint of the desired rotation edge.
3. Rotate the cube (ent.pan...) and all four vectors by the desired angle (vec_rotate).
4. Transform the cube and vectors from the transformed tip of the midpoint vector to the center of the cube (example: vec_diff (lastTrans, cube.x, vecToLeft)).
Hope that helps.