Skip to content

Commit 107ca14

Browse files
test - fix
Fixing issue with StopAndStartMotionTests randomly failing.
1 parent 2c34678 commit 107ca14

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

com.unity.netcode.gameobjects/Tests/Runtime/NetworkTransform/InterpolationStopAndStartMotionTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,8 @@ public override void OnUpdate()
270270
// Add it to the table of state updates
271271
var stateEntry = new StateEntry()
272272
{
273-
TimeAdded = Time.realtimeSinceStartup,
273+
// Use the server time to get the valid "relative" time since the session started.
274+
TimeAdded = NetworkManager.ServerTime.TimeAsFloat,
274275
State = m_PosInterpolator.InterpolateState,
275276
};
276277

0 commit comments

Comments
 (0)