I need help, I would like to know how do I animate the Cinemachine Virtual Camera in Follow Offset, I would like to change the y values. Well, FieldOfView can do it, because I want to use the FOV to do the ZoomOut and I wanted to use the Y to raise the camera a little.
I am not getting it is working wrong. Note this camera has Player as Follow.
CinemachineVirtualCamera _vCam;
CinemachineTransposer cineTransposer;
public float zoomSpeedFinish;
public float X, Y, Z;
public float PostT;
private void Awake()
{
_vCam = GetComponent();
cineTransposer = _vCam.GetCinemachineComponent();
}
public void ZoomOutFinish()
{
_vCam.m_Lens.FieldOfView = Mathf.Lerp(_vCam.m_Lens.FieldOfView, 90, zoomSpeedFinish);
cineTransposer.m_FollowOffset = Vector3.Lerp(cineTransposer.m_FollowOffset, new Vector3(X, Y, Z), PostT);
}
↧