This is a start. It still needs some work. Basically this will function like a switch. If isRotating is true then it will rotate the object. You just need to figure out when to change the isRotating...