You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,8 @@ Additional documentation and release notes are available at [Multiplayer Documen
27
27
- Fixed issue where scenes additively loaded before a session started were tracked as loaded on the server but had no scene handle entries, which caused `NetworkSceneManager.UnloadScene` to log an error and leave the scene registered as loaded even though it unloaded on all peers. (#4146)
28
28
- Issue where `NetworkTransform` interpolated towards a point in time taken from the local clock rather than the server clock that state updates are stamped on, which starved the interpolator on clients and reduced interpolation to snapping between state updates. (#4135)
29
29
- Issue where `NetworkTransform.GetTickLatencyInSeconds` returned an absolute network timestamp that grew for as long as the session ran, rather than the tick latency as a duration in seconds that it is documented to return. (#4135)
30
+
- Issue where lerp smoothing was applied per frame instead of over time, which caused the `Lerp` and `SmoothDampening` interpolation types to smooth by different amounts at different frame rates. Results at 60fps are unchanged. (#4132)
31
+
- Issue where setting a maximum interpolation time of 1.0 would stop a `NetworkTransform` from interpolating at all when using the `Lerp` or `SmoothDampening` interpolation types. (#4132)
30
32
- Issue with not being able to spawn initially disabled in-scene placed objects. (#4093)
31
33
- Issue with pre-instantiated network prefab instances being marked as in-scene placed. Now pre-instantiated network prefabs are dynamically spawned. (#4093)
32
34
- Issue where a user could spawn runtime created `NetworkObject` that has a GlobalObjectIdHash of zero. These are not valid instances and will no longer be allowed to spawn. (#4093)
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/Runtime/Components/Interpolator/BufferedLinearInterpolator.cs
+36-5Lines changed: 36 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -209,12 +209,23 @@ public void Reset(T currentValue)
209
209
internalboolLerpSmoothEnabled;
210
210
211
211
/// <summary>
212
-
/// Determines how much smoothing will be applied to the 2nd lerp when using the <see cref="Update(float, double, double)"/> (i.e. lerping and not smooth dampening).
212
+
/// The frame rate that <see cref="MaximumInterpolationTime"/> is relative to when lerp smoothing.
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/Runtime/Components/NetworkTransform.cs
+17-5Lines changed: 17 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1136,7 +1136,7 @@ public enum InterpolationTypes
1136
1136
/// Uses a 1 to 2 phase interpolation approach where:<br />
1137
1137
/// <list type="bullet">
1138
1138
/// <item><description>The first phase lerps from the previous state update value to the next state update value.</description></item>
1139
-
/// <item><description>The second phase (optional) performs lerp smoothing where the current respective transform value is lerped towards the result of the first phase at a rate of 1.0 minus the respective maximum interpolation time.</description></item>
1139
+
/// <item><description>The second phase (optional) performs lerp smoothing where the current respective transform value is lerped towards the result of the first phase at a frame rate independent rate determined by the respective maximum interpolation time.</description></item>
1140
1140
/// </list>
1141
1141
/// </summary>
1142
1142
/// <remarks>
@@ -1156,7 +1156,7 @@ public enum InterpolationTypes
1156
1156
/// Uses a 1 to 2 phase smooth dampening approach where:<br />
1157
1157
/// <list type="bullet">
1158
1158
/// <item><description>The first phase smooth dampens towards the current tick state update being processed by the accumulated delta time relative to the time to target.</description></item>
1159
-
/// <item><description>The second phase (optional) performs lerp smoothing where the current respective transform value is lerped towards the result of the first phase at a rate of delta time divided by the respective max interpolation time.</description></item>
1159
+
/// <item><description>The second phase (optional) performs lerp smoothing where the current respective transform value is lerped towards the result of the first phase at a frame rate independent rate determined by the respective maximum interpolation time.</description></item>
1160
1160
/// </list>
1161
1161
/// </summary>
1162
1162
/// <remarks>
@@ -1236,7 +1236,11 @@ public enum InterpolationTypes
1236
1236
/// Controls position interpolation smoothing.
1237
1237
/// </summary>
1238
1238
/// <remarks>
1239
-
/// When enabled, the <see cref="BufferedLinearInterpolator{T}"/> will apply a final lerping pass where the "t" parameter is calculated by dividing the frame time divided by the <see cref="PositionMaxInterpolationTime"/>.
1239
+
/// When enabled, the <see cref="BufferedLinearInterpolator{T}"/> will apply a final lerping pass towards
1240
+
/// the interpolated result at a rate determined by <see cref="PositionMaxInterpolationTime"/>.<br />
1241
+
/// This smoothing pass is frame rate independent under <see cref="InterpolationTypes.Lerp"/> and
1242
+
/// <see cref="InterpolationTypes.SmoothDampening"/>. <see cref="InterpolationTypes.LegacyLerp"/> keeps its
1243
+
/// original frame rate dependent smoothing, so the same value does not produce the same result there.
1240
1244
/// </remarks>
1241
1245
publicboolPositionLerpSmoothing=true;
1242
1246
privateboolm_PreviousPositionLerpSmoothing;
@@ -1257,7 +1261,11 @@ public enum InterpolationTypes
1257
1261
/// Controls rotation interpolation smoothing.
1258
1262
/// </summary>
1259
1263
/// <remarks>
1260
-
/// When enabled, the <see cref="BufferedLinearInterpolator{T}"/> will apply a final lerping pass where the "t" parameter is calculated by dividing the frame time divided by the <see cref="RotationMaxInterpolationTime"/>.
1264
+
/// When enabled, the <see cref="BufferedLinearInterpolator{T}"/> will apply a final lerping pass towards
1265
+
/// the interpolated result at a rate determined by <see cref="RotationMaxInterpolationTime"/>.<br />
1266
+
/// This smoothing pass is frame rate independent under <see cref="InterpolationTypes.Lerp"/> and
1267
+
/// <see cref="InterpolationTypes.SmoothDampening"/>. <see cref="InterpolationTypes.LegacyLerp"/> keeps its
1268
+
/// original frame rate dependent smoothing, so the same value does not produce the same result there.
1261
1269
/// </remarks>
1262
1270
publicboolRotationLerpSmoothing=true;
1263
1271
privateboolm_PreviousRotationLerpSmoothing;
@@ -1278,7 +1286,11 @@ public enum InterpolationTypes
1278
1286
/// Controls scale interpolation smoothing.
1279
1287
/// </summary>
1280
1288
/// <remarks>
1281
-
/// When enabled, the <see cref="BufferedLinearInterpolator{T}"/> will apply a final lerping pass where the "t" parameter is calculated by dividing the frame time divided by the <see cref="ScaleMaxInterpolationTime"/>.
1289
+
/// When enabled, the <see cref="BufferedLinearInterpolator{T}"/> will apply a final lerping pass towards
1290
+
/// the interpolated result at a rate determined by <see cref="ScaleMaxInterpolationTime"/>.<br />
1291
+
/// This smoothing pass is frame rate independent under <see cref="InterpolationTypes.Lerp"/> and
1292
+
/// <see cref="InterpolationTypes.SmoothDampening"/>. <see cref="InterpolationTypes.LegacyLerp"/> keeps its
1293
+
/// original frame rate dependent smoothing, so the same value does not produce the same result there.
0 commit comments