Hi, everyone
please help me to fix my problem, the problem is the following:
I have two vectors:
private Vector3 camPosition1 = new Vector3(-0.1018324F,10.98117F,0.6179969F);
private Vector3 camPosition2 = new Vector3(-0.1018324F,9.027315F,0.6179969F);
So i want the camera to move from camPosition1 to camPosition2 using Vector3.Lerp
I used the following code:
void Update()
{
transform.position = Vector3.Lerp(camPosition1, camPosition2, Time.time);
}
but Lerp doesn’t seem to work, the camera jumps directly without smooth movement
i did even try Time.deltaTime and again no luck!
is it because the two vectors are very close? i mean from y = 10.98117F to y = 9.027315F
Thank you all for your time, any help is greatly appreciated.