The second rotate3d in animation does the trick of swapping sides during rotation