-
Notifications
You must be signed in to change notification settings - Fork 457
Description
Description
It is possible due to network conditions (jitter and packet loss non-zero) for NetworkTransform
to receive in TransformStateUpdate()
two incoming NetworkTransformState
values in the same Unity frame.
If NetworkTransformState
A contains an updated rotation but NetworkTransformState
B only contains an updated position, then the m_LocalAuthoritativeNetworkState
in ApplyAuthoritativeState()
on the next OnUpdate()
will only contain the data for state B, so the rotation change will never happen and the two clients will now be out of sync (different rotations).
I'm not exactly sure why Interpolation negates this problem, but I would suppose it has something to do with the fact OnNetworkStateChanged()
is called on both A and B when they are received, so the data isn't lost to the interpolaters?
The problem will occur with real world network problems, but if you simulate something terrible like Delay=250, Jitter=40, Loss=20 it becomes a lot easier to reproduce.
Environment
OS: Windows 11
Unity Version: 6000.1.3f1
Netcode Version: 2.4.2
Netcode Topology: Client-Server