1
This commit is contained in:
@@ -233,6 +233,7 @@ namespace BITKit.Entities
|
||||
{
|
||||
public IOptional<float> Zoom { get; } = new Optional<float>(){Value = 1};
|
||||
public float Stable { get; set; }
|
||||
public float Aim { get; set; }
|
||||
public bool AllowAttack { get; set; }
|
||||
public bool AllowScope { get; set; }
|
||||
|
||||
@@ -331,14 +332,14 @@ namespace BITKit.Entities
|
||||
|
||||
if (virtualCamera is not null)
|
||||
{
|
||||
virtualCamera.m_Lens.FieldOfView =
|
||||
var targetFov =
|
||||
Mathf.Lerp(
|
||||
virtualCamera.m_Lens.FieldOfView,
|
||||
Zoom.Allow ?
|
||||
Mathf.Rad2Deg * CalcZoomFOV(Mathf.Deg2Rad * 60f, Zoom.Value) : PlayerConfig.Singleton.Fov,
|
||||
16*deltaTime
|
||||
);
|
||||
|
||||
virtualCamera.m_Lens.FieldOfView = Mathf.Lerp(PlayerConfig.Singleton.Fov, targetFov, Aim);
|
||||
|
||||
float CalcZoomFOV(float baseFOV, float zoom)
|
||||
{
|
||||
|
Reference in New Issue
Block a user