Commit 92c8052
committed
fix: Only substitute the retention limit at a maximum interpolation time of 1.0
Clamping to k_MaximumLerpSmoothRetention flattened everything above it, so
0.995 smoothed at the same rate as 0.99 and stopped honoring "higher is
smoother". Clamp to the legal range first and substitute only at the
freezing endpoint.
Also corrects the lerp smoothing remarks: LegacyLerp still applies
deltaTime / MaximumInterpolationTime per frame, so the frame rate
independence claim only holds for Lerp and SmoothDampening.1 parent cd0422f commit 92c8052
3 files changed
Lines changed: 30 additions & 7 deletions
File tree
- com.unity.netcode.gameobjects
- Runtime/Components
- Interpolator
- Tests/Editor
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
446 | | - | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
447 | 451 | | |
448 | 452 | | |
449 | 453 | | |
| |||
Lines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1238 | 1238 | | |
1239 | 1239 | | |
1240 | 1240 | | |
1241 | | - | |
1242 | | - | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
1243 | 1244 | | |
1244 | 1245 | | |
1245 | 1246 | | |
| |||
1262 | 1263 | | |
1263 | 1264 | | |
1264 | 1265 | | |
1265 | | - | |
1266 | | - | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
1267 | 1269 | | |
1268 | 1270 | | |
1269 | 1271 | | |
| |||
1286 | 1288 | | |
1287 | 1289 | | |
1288 | 1290 | | |
1289 | | - | |
1290 | | - | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
1291 | 1294 | | |
1292 | 1295 | | |
1293 | 1296 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
385 | 401 | | |
386 | 402 | | |
387 | 403 | | |
0 commit comments