Open JamieHyland1 opened 4 years ago
If you press the button to move the camera left or right too many times the camera swings in the opposite direction, this is due to it iterating through an array for the camera angle to lerp to see:
float[] degrees = {225,135,45,315}; if(Input.GetKeyDown(KeyCode.D)){ if(rotateIndex < 3) rotateIndex++; else rotateIndex = 0; rotateTo = rotateIndex + 1; if(rotateTo == 4) rotateTo = 0; Debug.Log(rotateTo); }
Ideally if you press the button before the camera stops moving it shouldn't do anything.
If you press the button to move the camera left or right too many times the camera swings in the opposite direction, this is due to it iterating through an array for the camera angle to lerp to see: