I want to make it so when I press the play button, the camera smoothly transitions from its current position, to the target position using the SmoothDamp function. But instead the camera just snaps to somewhere close to the target position (i.e the target position is 0, 0, -1 but the camera goes to 0.0011, 0.2716, -0.9988)
this method is called when I click the play button:
private Vector3 velocity = Vector3.one;
public float smoothTime = 0.3f;
public void CameraTransition()
{
Vector3 positionTarget = new Vector3(0, 0, -1);
transform.position = Vector3.SmoothDamp(transform.position, positionTarget, ref velocity, smoothTime * Time.deltaTime);
}