rotateToAngle function fleshed out.