aim assist in inputs
This commit is contained in:
@@ -312,6 +312,7 @@ public partial class PlayerController : CharacterBody3D,
|
||||
private float _mouseSensitivityMultiplier = 1.0f;
|
||||
private float _headBobbingMultiplier = 1.0f;
|
||||
private float _fovChangeMultiplier = 1.0f;
|
||||
private float _aimAssistMultiplier = 1.0f;
|
||||
|
||||
// Timers
|
||||
private Timer _timeScaleAimInAirTimer;
|
||||
@@ -668,6 +669,7 @@ public partial class PlayerController : CharacterBody3D,
|
||||
_mouseSensitivityMultiplier = (float) config.GetValue("InputSettings", "MouseSensitivity", 1.0f);
|
||||
_headBobbingMultiplier = (float) config.GetValue("InputSettings", "HeadBobbingWhileWalking", 1.0f);
|
||||
_fovChangeMultiplier = (float) config.GetValue("InputSettings", "FovChangeWithSpeed", 1.0f);
|
||||
_aimAssistMultiplier = (float) config.GetValue("InputSettings", "AimAssist", 1.0f);
|
||||
}
|
||||
public void OnTutorialDone(Node3D _)
|
||||
{
|
||||
@@ -972,7 +974,7 @@ public partial class PlayerController : CharacterBody3D,
|
||||
// Reduce aim assist when closing in on target because it can mess with the camera when dashing through
|
||||
var distanceFactor = Mathf.Clamp(distanceToTarget / AimAssistReductionStartDistance, 0f, 1f);
|
||||
var aimAssistReductionFactor = Mathf.Lerp(AimAssistReductionWhenCloseToTarget, 1f, distanceFactor);
|
||||
return aimAssist * aimAssistReductionFactor;
|
||||
return aimAssist * aimAssistReductionFactor * _aimAssistMultiplier;
|
||||
}
|
||||
|
||||
private void LookAround(double delta)
|
||||
|
||||
Reference in New Issue
Block a user