So I am a beginner starting out on C# and I don’t really know much things but already googled and tried everything I could to know but I am trying to make when Shift is pressed the FOV should lerp from 1 value to another value to make it look nice than big value jumps
if (Input.GetKeyDown(KeyCode.LeftShift))
{
speed = RunSpeed;
Camera.main.fieldOfView = Mathf.Lerp(70, 80, 2);
}
if (Input.GetKeyUp(KeyCode.LeftShift))
{
speed = 3f;
Camera.main.fieldOfView = Mathf.Lerp(80, 70, 2);
}