Fix: the combat "freeze on a kill" — camera shake channel + drop the position hold
This is what the operator's report was actually describing, and it was never a CPU hitch: median frame was 12.2 ms with a kill costing ~15 ms, wave respawn is not a spike, and enemies carry no PhysicsCollider so corpses never blocked. Two bugs in PrototypeCameraRig.LateUpdate, both measured with a STATIONARY player so the ideal camera motion is exactly zero and everything observed is artifact: 1. Shake was integrated by the follow filter. The smoothing ran as Lerp(transform.position, desired, k), and transform.position already contained last frame's random shake — so the filter treated shake as real positional error and corrected only ~9 %/frame. Shake was never subtracted, just slowly lerped out while new shake piled on, so in sustained combat the camera random-walked around its framing and never settled. One kill left it 0.447 units off-frame and still 0.199 off 24 frames later. The follow now smooths a _basePos that shake never touches; shake is applied only when writing the transform. 2. The position HOLD froze the follow for a fixed number of RENDER frames on every kill and heavy hit (2, or 7 on a finisher), making the freeze framerate-dependent — 49 ms at 144 fps, 233 ms at 30 fps — and it took its base from transform.position, permanently baking that frame's shake in as a 0.283-unit single-frame jump. A camera that stops while the world keeps moving reads as a hitch, not as crunch. Dropped; impact rides the FOV punch + shake alone (operator's call). HitStopMaxFrames / HitStopFreezeEnabled / FinisherHoldFrames retire with it, and the three saved feel profiles drop the dead keys. Worth recording: dropping the hold ALONE measured slightly worse (max deviation 0.653 vs 0.447) — the hold had been partly masking the shake integration. Both fixes together: deviation returns to 0.000 within a few frames of a kill, mean deviation 0.038 across the window. The 0.428 peak is now the shake impulse itself, a transient punch that immediately returns instead of a drift that lingers. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
"feel": [
|
||||
{ "k": "MeleeArcIntensity", "v": "0.8" },
|
||||
{ "k": "MeleeArcBubbles", "v": "6" },
|
||||
{ "k": "FinisherHoldFrames", "v": "7" },
|
||||
{ "k": "MeleeConnectFovKick", "v": "1.1" },
|
||||
{ "k": "CombatIdleHoldSec", "v": "4" }
|
||||
]
|
||||
|
||||
@@ -32,10 +32,6 @@
|
||||
"k": "MeleeArcIntensity",
|
||||
"v": "0.8"
|
||||
},
|
||||
{
|
||||
"k": "FinisherHoldFrames",
|
||||
"v": "7"
|
||||
},
|
||||
{
|
||||
"k": "MeleeConnectFovKick",
|
||||
"v": "1.1"
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
],
|
||||
"feel": [
|
||||
{ "k": "MeleeArcIntensity", "v": "1.1" },
|
||||
{ "k": "FinisherHoldFrames", "v": "4" },
|
||||
{ "k": "MeleeConnectFovKick", "v": "0.7" }
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user