Use rotateBy instead of rotate.