本文主要是介绍CinemachineFreelook相机鬼畜抖动的解决方法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
又是培训机构的出品。。。。。。
2020.3.27
发现跟随时抖动的原因了,其实应该按照传统相机的跟随逻辑放在late update里执行,但是由于开发cinemachine的开发组很坑地把cinemachine freelook里的三个轨道Damping值默认给了3,于是相机会以每0.75秒的延时重定位到轨道上,造成跟随时相机的疯狂抖动。
现在最新版本Cinemachine 的Damping是1,不敢想象,之前的3,是有多抖
(解决)
账号过期了,也无法看到,底层的逻辑是否真的在 Update()里面一直执行,导致疯狂抖动,也无法控制渲染,这个的cinemachine 你们是不是真的敢用在游戏 Runtime??
namespace Cinemachine
{/// <summary>/// A Cinemachine Camera geared towards a 3rd person camera experience./// The camera orbits around its subject with three separate camera rigs defining/// rings around the target. Each rig has its own radius, height offset, composer,/// and lens settings./// Depending on the camera's position along the spline connecting these three rigs,/// these settings are interpolated to give the final camera position and state./// </summary>[DocumentationSorting(DocumentationSortingAttribute.Level.UserRef)][DisallowMultipleComponent][ExecuteAlways][ExcludeFromPreset][AddComponentMenu("Cinemachine/CinemachineFreeLook")][HelpURL(Documentation.BaseURL + "manual/CinemachineFreeLook.html")]public class CinemachineFreeLook : CinemachineVirtualCameraBase{
这篇关于CinemachineFreelook相机鬼畜抖动的解决方法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!