New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: NetworkTransform synchronization fixes and owner authoritative performance improvement on server-host [MTT-6971] #2636
Merged
NoelStephensUnity
merged 16 commits into
develop
from
fix/networktransform-owner-authority-halfprecision-nonowner-sync
Aug 1, 2023
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This resolves an issue with half float precision not synchronizing properly when running in owner authoritative mode, the owner client sends an update to the host-server, the host-server then forwards the state update to the remaining clients at the end of the frame but during the initial processing of the state update the delta position value is collapsed into the full float position due to exceeding the maximum delta. The primary issue was the order of operations that occurred using NetworkVariables to update the transform state when in owner authority mode. This also reduces the amount of serialization and processing a host has to perform when receiving owner authoritative updates and there are 2 or more remote clients connected (i.e. it has to forward the result to the other clients). Now, it just forwards the message payload to the non-owner clients upon receiving the state update.
…precision-nonowner-sync
This fixes an on-going issue with scale where really the answer was to send both the lossy and local scale values when synchronizing and/or teleporting and letting the client-side determine which to use depending upon whether the NetworkObject was parented, was the parenting applied when applying the states, and whether the parenting used WorldPositionStays. This also fixes some minor issues with the parenting test not checking if the NetworkObject was parented before testing the final values. This also updates named message handling slightly so it doesn't spam the log console during shutdown if there are incoming messages while shutting down.
removing commented out code
samlucas-unity
requested changes
Jul 25, 2023
…precision-nonowner-sync
resolves an issue where you have an owner authoritative NetworkTransform and a host-server with two remote clients connected and the following sequence occurs: - Client A connects to the host first and takes ownership of a NetworkObject but does not change the transform state. - Client B connects and attempts to move the NetworkObject that Client A owns - Client B was able to move the NetworkObject The code removed was no longer needed with this PRs parenting adjustments.
samlucas-unity
approved these changes
Jul 31, 2023
NoelStephensUnity
changed the title
fix: NetworkTransform synchronization fixes and owner authoritative performance improvement on server-host
fix: NetworkTransform synchronization fixes and owner authoritative performance improvement on server-host [MTT-6971]
Aug 1, 2023
NoelStephensUnity
deleted the
fix/networktransform-owner-authority-halfprecision-nonowner-sync
branch
August 1, 2023 16:51
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR address the following issues:
MTT-7057
MTT-7056
MTT-6971
fix: #2628
fix: #2639
Changelog
NetworkObject
s.NetworkTransform
.NetworkTransform
if ownership changed without any updates to position prior to the non-owner client joining.Testing and Documentation