update
This commit is contained in:
@@ -16,16 +16,23 @@ namespace OnlyScove.Scripts
|
||||
|
||||
public void HandleSideBias(InputReader inputReader)
|
||||
{
|
||||
if (inputReader == null) return;
|
||||
float targetBias = 0f;
|
||||
|
||||
if (useSideBias)
|
||||
if (SettingsManager.Instance != null && SettingsManager.Instance.Settings != null)
|
||||
{
|
||||
float targetBias = -inputReader.MoveInput.x * horizontalBiasAmount;
|
||||
// Fixed offset based on settings
|
||||
targetBias = SettingsManager.Instance.Settings.sideBiasRight ? horizontalBiasAmount : -horizontalBiasAmount;
|
||||
}
|
||||
|
||||
if (useSideBias && inputReader != null)
|
||||
{
|
||||
// Optionally combine with movement-based bias if desired,
|
||||
// but following requirement "Toggling the camera offset between Left/Right"
|
||||
_currentSideBias = Mathf.Lerp(_currentSideBias, targetBias, biasSmoothTime * Time.deltaTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
_currentSideBias = 0;
|
||||
_currentSideBias = Mathf.Lerp(_currentSideBias, 0, biasSmoothTime * Time.deltaTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user