menus and settings
This commit is contained in:
@@ -24,6 +24,7 @@ public partial class FieldOfView: Node3D
|
||||
public float Delta;
|
||||
public float SprintSpeed;
|
||||
public Vector3 Velocity;
|
||||
public float FOVMultiplier;
|
||||
}
|
||||
|
||||
public void PerformFovAdjustment(FovParameters parameters)
|
||||
@@ -33,10 +34,10 @@ public partial class FieldOfView: Node3D
|
||||
0.5f,
|
||||
parameters.SprintSpeed * 2.0f);
|
||||
|
||||
float targetFov = BaseFov + FovChangeFactor * velocityClamped;
|
||||
float targetFov = BaseFov + FovChangeFactor * velocityClamped * parameters.FOVMultiplier;
|
||||
|
||||
if (parameters.IsCrouchingHeight){
|
||||
targetFov = BaseFov - FovChangeFactor * velocityClamped;
|
||||
targetFov = BaseFov - FovChangeFactor * velocityClamped * parameters.FOVMultiplier;
|
||||
}
|
||||
|
||||
_camera.Fov = Mathf.Lerp(_camera.Fov, targetFov, parameters.Delta * FovChangeSpeed);
|
||||
|
||||
Reference in New Issue
Block a user