So in scene 1 I’m moving my camera using Slerp as shown below:
theCamera.transform.rotation = Quaternion.Slerp(theCamera.transform.rotation, NextCameraPosition.rotation, Time.deltaTime * 2.25f);
theCamera.transform.position = Vector3.Slerp(theCamera.transform.position, NextCameraPosition.position, Time.deltaTime * 1.75f);
So the logic is I press button 1 in scene 1 and it slerps. This works.
If I go to a new scene then go back to scene 1 and press button 1 the slerp doesn’t work. After about 2 hours of debugging I realized it is because Time.deltaTime is returning 0.
Has anyone experienced this? I didn’t even know that could happen.
I added a debug button that just prints out Time.deltaTime. When I run my game and hit the debug button I get around 0.002. Once I go to a new scene then go back to my first scene the debug button prints out 0. So somehow some way time.deltaTime is returning 0.
Any information on the subject would be greatly appreciated.
Thanks.
please post your solution as answer and don't include it in your question. Post an answer and accept it to close the question.
– Bunny83you could try: var myScale = 1; function Start() { Time.timeScale = myScale; }
– DryTear