WHen I run this code when my level is 0 it lerps the rotation of the object and gets it to 0,180,0,0
but when I do it again when it reaches level 2 it doesn’t change anything? not while it’s lerping on level 0 and neither when it’s done lerping?
here is the code:
public void MoveCamera(int level){
switch(level){
case 0:
camera.orthographicSize = Mathf.Lerp(camera.orthographicSize, 10, 1*Time.deltaTime);
transform.rotation = Quaternion.Lerp (transform.rotation, new Quaternion(0, 180, 0, 0), Time.deltaTime * 0.003f);
break;
case 2:
camera.orthographicSize = Mathf.Lerp(camera.orthographicSize, 8, 1*Time.deltaTime);
transform.position = Vector3.Lerp (transform.position, new Vector3(0, -30, -14), 1*Time.deltaTime);
transform.rotation = Quaternion.Lerp (transform.rotation, new Quaternion(0, 0, 0, 0), Time.deltaTime * 0.01f);
break;
case 3:
camera.orthographicSize = 11;
transform.position = Vector3.Lerp (transform.position, new Vector3(0, -27.5f, -19), 1*Time.deltaTime);
break;
}
}
THanks,