com.unity.netcode.gameobjects icon indicating copy to clipboard operation
com.unity.netcode.gameobjects copied to clipboard

Transmission problems of networktransform #2093

Open xyxwangkai opened this issue 3 years ago • 1 comments

Description If NetworkTransform only modifies some attributes (for example, only the x of Pos is modified this time), m_Bitset is not reset after the message is sent, resulting in the sent attributes being sent forever

here would be a hypothetical example:

We only modify position.x and position.z, but during debugging, we found that in the NetworkTransform.NetworkSerialize method, the value of NetworkTransformState is 942 (except HasRotAngleX and HasRotAngleZ are false) and the rest of the parameters are true, which is incorrect?

Changelog

-Add:

  1. The data packet only transmits the changed attribute value.
  2. Cache the value of the last NetworkTransformState
  3. NewTransformState and OldTransformState do the union
  • Fixed:

  • Removed/Deprecated/Changed: Each bullet should be prefixed with Added, Fixed, Removed, Deprecated, or Changed to indicate where the entry should go.

Testing and Documentation

We used the default values for the test. Which is: Position: x always changes Rotation: does not change Scale: does not change

Result: Traffic drops drastically, client behaves normally

xyxwangkai avatar Aug 03 '22 06:08 xyxwangkai

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


wangkai.0420 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

unity-cla-assistant avatar Aug 03 '22 06:08 unity-cla-assistant

This is fixed in PR-2110

NoelStephensUnity avatar Aug 17 '22 22:08 NoelStephensUnity