角色能力,存档
This commit is contained in:
@@ -150,7 +150,7 @@ namespace BaseGames.Camera
|
||||
if (dt > 0f)
|
||||
{
|
||||
float rawSpeed = (_baseTarget.position - _lastBasePosition).magnitude / dt;
|
||||
_estimatedSpeed = Mathf.Lerp(_estimatedSpeed, rawSpeed, dt * 8f);
|
||||
_estimatedSpeed = Mathf.Lerp(_estimatedSpeed, rawSpeed, 1f - Mathf.Exp(-dt * 8f));
|
||||
}
|
||||
_lastBasePosition = _baseTarget.position;
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace BaseGames.Camera
|
||||
}
|
||||
|
||||
float speedV = Mathf.Abs(_targetOffsetY) < 0.01f ? _resetSpeedV : _lookSpeedV;
|
||||
_currentOffsetY = Mathf.Lerp(_currentOffsetY, _targetOffsetY, dt * speedV);
|
||||
_currentOffsetY = Mathf.Lerp(_currentOffsetY, _targetOffsetY, 1f - Mathf.Exp(-dt * speedV));
|
||||
|
||||
// ── 水平窥视 ──────────────────────────────────────────────────────
|
||||
if (withinGate && Mathf.Abs(_inputX) > 0.5f)
|
||||
@@ -186,7 +186,7 @@ namespace BaseGames.Camera
|
||||
}
|
||||
|
||||
float speedH = Mathf.Abs(_targetOffsetX) < 0.01f ? _resetSpeedH : _lookSpeedH;
|
||||
_currentOffsetX = Mathf.Lerp(_currentOffsetX, _targetOffsetX, dt * speedH);
|
||||
_currentOffsetX = Mathf.Lerp(_currentOffsetX, _targetOffsetX, 1f - Mathf.Exp(-dt * speedH));
|
||||
|
||||
// ── 虚拟目标 = 玩家位置 + 双轴偏移 ────────────────────────────────
|
||||
_virtualTargetTransform.position = _baseTarget.position
|
||||
|
||||
Reference in New Issue
Block a user