I’m having an issue that I can’t quite pin down. I’m trying to lerp the orthographic size of the camera over a set number of seconds ( slowSizeDuration), but my counter for the lerp function (slowSizeTimer) is only returning infinity. slowSizeTimer is initialized to 0.001f in start.
if(slowSizeTimer > slowSizeDuration && slowSize == true){
slowSize = false;
}else{
slowSizeTimer += (Time.deltaTime/slowSizeDuration);
Debug.Log(slowSizeTimer + " - " + Time.deltaTime + " - " + slowSizeDuration + " - " + Time.deltaTime/slowSizeDuration);
}
The Debug Log shows this every frame: Infinity - 0.02 - 5 - 0.004