Skip to content
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 full precision state updates being lost when interpolating [MTT-6799] #2624

Conversation

NoelStephensUnity
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity commented Jul 13, 2023

This PR resolves the issue with NetworkTransform losing part of a state update for any given axis when using full precision and interpolating on non-authoritative instances. The fix involves saving the targeted state update for position, rotation, and scale as opposed to using the current position, rotation, or scale.

MTT-6799

fix: #2595

Changelog

  • Fixed: issue where a NetworkTransform using full precision state updates was losing transform state updates when interpolation was enabled.

Testing and Documentation

  • Includes integration test updates (WIP).
  • No documentation changes or additions were necessary.

This fixes the issue where full precision transform synchronization was losing state while interpolating.
initial change log entry
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner July 13, 2023 00:46
Adding PR number to change log entry
Missed including half float precision scale with interpolation enabled since scale only updates the axis that changed (i.e. a target axis value could get stomped otherwise when half precision was enabled...the coming test discovered this).
Modified NetworkTransformMultipleChangesOverTime to use interpolation when 3 axis are being tested as well as added the additional logic required to catch the issue not caught by this test where a state update could stomp a single axial value if the target value had not yet been reached.
Copy link
Contributor

@samlucas-unity samlucas-unity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :)

@NoelStephensUnity NoelStephensUnity merged commit 9af9280 into develop Jul 14, 2023
1 check passed
@NoelStephensUnity NoelStephensUnity deleted the fix/networktransform-y-axis-synchronization-2022-mtt-6799 branch July 14, 2023 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NetworkTransform not synchronizing Y position well on Unity 2022+ versions
2 participants