You should start using DeltaSeconds in there, I believe your issue may be that you are checking if the rotation is exactly 40.0f and if you are not using DeltaSeconds the update of this value may occur during a black frame thus not updating back to 0.0f. Why don’t you try logging those values on the Output log and see what comes out?