Unity - Cinemachine

动态获取Cinemachine的内部组件

vCam.GetCinemachineComponent()

动态修改Cinemachine的Transposer属性

Unity - Cinemachine_第1张图片

var vCamComp = transfrom.GetComponent();
var transposerComp = vCamComp.GetCinemachineComponent();
comp.m_FollowOffset = new Vector3(0, 0, 0);
comp.m_XDamping = 0;
comp.m_YDamping = 0;
comp.m_ZDamping = 0;
comp.m_BindingMode = CinemachineTransposer.BindingMode.WorldSpace;

你可能感兴趣的:(Unity,unity,Cinemachine)