Hi all,
I am making a racing game in which i am shifting the target of camera from one car to another.
If i am changing the target, the camera is suddenly coming on the back of another car to which the target have been shifted to.
What i want is that the camera has to travel in the path to reach the target instead going to the back of the new target suddenly.
I have been using this code to try that
cameraTransform.position = Vector3.Lerp(cameraTransform.position, TargetPosition, 5.0f * Time.deltaTime);