Skip to content

Commit 4c36581

Browse files
test
providing a bit more time and reducing the target position to provide enough time to for interpolation.
1 parent ed45dc9 commit 4c36581

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,23 +296,23 @@ public void NonAuthorityOwnerSettingStateTest([Values] Interpolation interpolati
296296
//Assert.True(success, $"Timed out waiting for initialization to be applied!");
297297

298298
// Test one parameter at a time first
299-
var newPosition = new Vector3(55f, 35f, 65f);
299+
var newPosition = new Vector3(15f,-12f, 10f);
300300
var newRotation = Quaternion.Euler(1, 2, 3);
301301
var newScale = new Vector3(2.0f, 2.0f, 2.0f);
302302
m_NonAuthoritativeTransform.SetState(newPosition, null, null, interpolate);
303-
var success = WaitForConditionOrTimeOutWithTimeTravel(() => PositionsMatchesValue(newPosition), 800);
303+
var success = WaitForConditionOrTimeOutWithTimeTravel(() => PositionsMatchesValue(newPosition), 1000);
304304
Assert.True(success, $"Timed out waiting for non-authoritative position state request to be applied!\n {VerboseDebugLog}");
305305
Assert.True(Approximately(newPosition, m_AuthoritativeTransform.transform.position), "Authoritative position does not match!");
306306
Assert.True(Approximately(newPosition, m_NonAuthoritativeTransform.transform.position), "Non-Authoritative position does not match!");
307307
m_NonAuthoritativeTransform.SetState(null, newRotation, null, interpolate);
308-
success = WaitForConditionOrTimeOutWithTimeTravel(() => RotationMatchesValue(newRotation.eulerAngles), 800);
308+
success = WaitForConditionOrTimeOutWithTimeTravel(() => RotationMatchesValue(newRotation.eulerAngles), 1000);
309309
Assert.True(success, $"Timed out waiting for non-authoritative rotation state request to be applied!\n {VerboseDebugLog}");
310310
Assert.True(Approximately(newRotation.eulerAngles, m_AuthoritativeTransform.transform.rotation.eulerAngles), $"Authoritative rotation does not match!\n {VerboseDebugLog}");
311311
Assert.True(Approximately(newRotation.eulerAngles, m_NonAuthoritativeTransform.transform.rotation.eulerAngles), $"Non-Authoritative rotation does not match!\n {VerboseDebugLog}");
312312
Assert.True(Approximately(newRotation.eulerAngles, m_NonAuthoritativeTransform.transform.rotation.eulerAngles), $"Non-Authoritative rotation does not match!\n {VerboseDebugLog}");
313313

314314
m_NonAuthoritativeTransform.SetState(null, null, newScale, interpolate);
315-
success = WaitForConditionOrTimeOutWithTimeTravel(() => ScaleMatchesValue(newScale), 800);
315+
success = WaitForConditionOrTimeOutWithTimeTravel(() => ScaleMatchesValue(newScale), 1000);
316316
Assert.True(success, $"Timed out waiting for non-authoritative scale state request to be applied!\n {VerboseDebugLog}");
317317
Assert.True(Approximately(newScale, m_AuthoritativeTransform.transform.localScale), $"Authoritative scale does not match!\n {VerboseDebugLog}");
318318
Assert.True(Approximately(newScale, m_NonAuthoritativeTransform.transform.localScale), $"Non-Authoritative scale does not match!\n {VerboseDebugLog}");
@@ -323,7 +323,7 @@ public void NonAuthorityOwnerSettingStateTest([Values] Interpolation interpolati
323323
newScale = new Vector3(0.5f, 0.5f, 0.5f);
324324

325325
m_NonAuthoritativeTransform.SetState(newPosition, newRotation, newScale, interpolate);
326-
success = WaitForConditionOrTimeOutWithTimeTravel(() => PositionRotationScaleMatches(newPosition, newRotation.eulerAngles, newScale), 800);
326+
success = WaitForConditionOrTimeOutWithTimeTravel(() => PositionRotationScaleMatches(newPosition, newRotation.eulerAngles, newScale), 1000);
327327
Assert.True(success, $"Timed out waiting for non-authoritative position, rotation, and scale state request to be applied!\n {VerboseDebugLog}");
328328
Assert.True(Approximately(newPosition, m_AuthoritativeTransform.transform.position), $"Authoritative position does not match!\n {VerboseDebugLog}");
329329
Assert.True(Approximately(newPosition, m_NonAuthoritativeTransform.transform.position), $"Non-Authoritative position does not match!\n {VerboseDebugLog}");

0 commit comments

Comments
 (0)