- Home /
 
Rotation stops when reload scene
hi every one i have problem with reload the scene SceneManager.LoadScene("game"); in my game i have ball spinning all the time but when i restart the scene The rotation stops after restarting the scene . this is ball script
 void Update () {
         s += Time.deltaTime * 0.04f;
         transform.Rotate (0,0,- Time.deltaTime * s * (2 * 3.141593f * 0.1231894f) * 100);
 
     }
 
               please help me
Value of s is really small at beginning. $$anonymous$$aybe its rotate, but you cant notice?
Answer by xav13rua · Jan 24, 2018 at 02:41 PM
Yes, I also have this problem
In my case, I can see through the unity editor hierarchy, that my object is still rotating. its transform.rotation Y value is rotating as I want it to, with this:
 transform.Rotate (new Vector3 (0, 30, 0) * Time.deltaTime,Space.World)
 
                  If I go to the scene mode while the game is running, and click on the game object rotating, I can see green lines rotating as the object should, but the object image stays still. I tried adding
 Time.timeScale = 1;
 
                  But the problem still stays.
Your answer