com.unity.netcode.gameobjects
com.unity.netcode.gameobjects copied to clipboard
Transmission problems of networktransform #2093
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:
- The data packet only transmits the changed attribute value.
- Cache the value of the last NetworkTransformState
- 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
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.
This is fixed in PR-2110