浏览代码

Use Range for cameraSensitivity of CameraManager

Previously, the cameraSensitivity was unbounded but, on Awake, was
clamped to a certain range. This range is now enforced via a Range
attribute on the cameraSensitivity variable.
/main
Austin Brown 4 年前
当前提交
f1435a8e
共有 1 个文件被更改,包括 1 次插入6 次删除
  1. 7
      UOP1_Project/Assets/Scripts/CameraManager.cs

7
UOP1_Project/Assets/Scripts/CameraManager.cs


public CinemachineFreeLook freeLookVCam;
[Tooltip("General multiplier for camera sensitivity/speed")]
[Range(1.0f, 20.0f)]
private void Awake()
{
// Don't allow the camera to be slower than default and then also 20+ gets pretty crazy.
cameraSensitivity = Mathf.Clamp(cameraSensitivity, 1.0f, 20.0f);
}
private void OnEnable()
{

正在加载...
取消
保存