浏览代码

Removed _spawnDistanceFromPlayer

/UI
vjs22334 4 年前
当前提交
53886896
共有 1 个文件被更改,包括 2 次插入8 次删除
  1. 10
      UOP1_Project/Assets/Scripts/CameraManager.cs

10
UOP1_Project/Assets/Scripts/CameraManager.cs


private bool _isRMBPressed;
[SerializeField, Range(.5f, 3f)]
private float _speedMultiplier = 1f; //TODO: make this modifiable in the game settings
//this is the distance from player the camera will warp to when a new scene is loaded. this can be set individually on each scene, zero is the most consistent
[SerializeField,Tooltip("the distance from player the camera will warp to when a new scene is loaded")]
private float _SpawnDistanceFromPlayer = 0f;
private float _speedMultiplier = 1f; //TODO: make this modifiable in the game settings
[SerializeField] private TransformAnchor _cameraTransformAnchor = default;
[Header("Listening on channels")]

{
freeLookVCam.Follow = target;
freeLookVCam.LookAt = target;
//warp the camera to target without lerping to avoid long lerps
Vector3 positionDelta = (target.position-freeLookVCam.transform.position) - (target.position-freeLookVCam.transform.position).normalized*_SpawnDistanceFromPlayer;
freeLookVCam.OnTargetObjectWarped(target,positionDelta);
freeLookVCam.OnTargetObjectWarped(target,target.position-freeLookVCam.transform.position);
}
private void OnEnable()

正在加载...
取消
保存