Quantcast
Channel: Questions in topic: "follow"
Viewing all articles
Browse latest Browse all 536

How to Move a Cinemachine Camera With Script, FOV and Follow Offset

$
0
0
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); }

Viewing all articles
Browse latest Browse all 536

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>