- Home /
Reset the velocity after the game has unpaused C# 2D
I have my 2d game and i have a working pause function, but the problem is, whwn i pause the game, the pause menu comes up fine, but after i unpause the game the character shoots to the groud as if it has gained weight or as if the game was still playing and the object was falling and when i finally unpaused the game, because of the amount of velocity that had been gained, the object shoots to the ground. How can i over some this, could i disable the rigidbody whilst the game in on pause? Thanks
how are you pausing the game?
If you use Time.timeScale = 0f;
to pause and Time.timeScale = 1f;
to unpause it should stop the physics and FixedUpdate() from being called.
Im using the Time.timeScale to pause and unpause my game, but it does not pause physics i dont think?
Answer by Dungur · Feb 08, 2015 at 07:42 PM
If you lower timeScale it is recommended to also lower Time.fixedDeltaTime by the same amount
Source: http://docs.unity3d.com/ScriptReference/Time-timeScale.html
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Pausing Music 1 Answer
No pausing when game over occurs 1 Answer
Set Timescale to 0 for game, except for pause menu 2 Answers