I'm not using Lerp properly

Hi, I’m trying to get a smooth movement with the camera from one spot to another and i used Vector.Lerp for it but it blatently ignores my lerptime i put in it. Although i see that my time variable is getting incremented correctly it just lerps way to fast. What am I doing wrong here?

public float lerpTime = 12f;

IEnumerator CameraMovementTransition(Transform beginPosition, Transform endPosition)
	{
		isMoving=true;
		
		float time = 0.0f;
		while (time < 1.0f)
	    {
	        time += Time.deltaTime * (Time.timeScale/lerpTime);
	 		Debug.Log(time);
	        transform.position = Vector3.Lerp(beginPosition.position,endPosition.position,Mathf.SmoothStep(0.0f,1.0f,Mathf.SmoothStep(0.0f,1.0f,time)));
			transform.rotation = Quaternion.Slerp(beginPosition.rotation,endPosition.rotation,Mathf.SmoothStep(0.0f,1.0f,Mathf.SmoothStep(0.0f,1.0f,time)));
	        yield return null;
	    }
		isMoving = false;
	}

you don’t understand how the third variable works.

basically your third variable should be

speed * time.deltatime everytime.

or

speed * time.fixedtime if your using fixedupdate.

also your begin position should update every frame.

this is a simple line to lerp a camera.

float cameraspeed = 10f;

camera.transform.position = vector3.lerp(camera.transform.position, endposition,cameraspeed * time.deltatime);

thats a properly done lerp.