- Home /
 
 
               Question by 
               r_chevallier · Sep 11, 2015 at 04:45 PM · 
                velocityspeedmoveloadlevelapplication.loadlevel  
              
 
              Camera movement speeds up when restarting game using Application.LoadLevel?
Hello,
The below scenario only happens when I preview my game within Unity. If I publish the game it seems to work fine. Dont know why.
I have a camera that has a moving script on it. It works fine untill my scene is restarted using "Application.LoadLevel" via a play again button. My camera then speeds up significantly. How do I make sure my camera keeps the original speed?
Here is my moving script:
 public class Done_Mover : MonoBehaviour
 {
     public float speed = 7.75f;
 public float moveX = 0;
     public float moveY = 1;
     public float moveZ = 0;
  
     public Rigidbody currentVelocity;
     
     
     void Awake () {
         currentVelocity = GetComponent<Rigidbody>();
         speed = speed * Time.deltaTime;
     }
     
     void Start ()
     {
         currentVelocity.velocity = new Vector3(moveX * speed, moveY * speed, moveZ * speed); 
     }
 }
 
               Thank You, Raymond
               Comment
              
 
               
              Your answer
 
             Follow this Question
Related Questions
Limiting rigidbody Speed. 5 Answers
How should I move an object that parents on collision? 1 Answer
instantiated objects have different speed 1 Answer
Increase speed every 5 seconds 1 Answer
Mouse move with specific speed? 2 Answers