浏览代码

Make Noise Work

/feature-cinemachine-noise-shake
Thomas ICHÉ 4 年前
当前提交
c9461d4f
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 3
      Runtime/LevelScripting/Actions/CinemachineSetCameraNoiseAction.cs

3
Runtime/LevelScripting/Actions/CinemachineSetCameraNoiseAction.cs


[SerializeField, HideIf("useLiveCamera")]
CinemachineVirtualCamera targetCamera;
[SerializeField]
NoiseSettings settings;
public override void Execute(GameObject instigator = null)

var noise = cam.GetCinemachineComponent<CinemachineBasicMultiChannelPerlin>();
if(noise == null && settings != null)
cam.AddCinemachineComponent<CinemachineBasicMultiChannelPerlin>();
noise = cam.AddCinemachineComponent<CinemachineBasicMultiChannelPerlin>();
noise.m_NoiseProfile = settings;
}

正在加载...
取消
保存