-
Notifications
You must be signed in to change notification settings - Fork 460
fix: networktransform SwitchTransformSpaceWhenParented forces updates when InLocalSpace is true #3664
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 SwitchTransformSpaceWhenParented forces updates when InLocalSpace is true #3664
Conversation
Reset IsTeleporting and ExplicitSet after invoking OnAuthorityPushTransformState so these values are preserved for user script. Automatically adjust InLocalSpace when spawning a NeworkObject based on the NetworkObject's current parented status when SwitchTransformSpaceWhenParented is enabled.
…e-forcing-updates-localspace
…calspace' of https://github.com/Unity-Technologies/com.unity.netcode.gameobjects into fix/networktransform-autoswitchspace-forcing-updates-localspace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left suggestions on the smaller changes - have pushed a commit with changes to the larger new additions to the NetworkTransform page, mostly just trying to improve clarity and reduce verbiage.
This page is getting very long, might break it up at some point, but will do that in a separate PR.
com.unity.netcode.gameobjects/Documentation~/components/core/networkobject.md
Outdated
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Documentation~/components/core/networkobject.md
Outdated
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Runtime/Components/NetworkTransform.cs
Outdated
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Runtime/Components/NetworkTransform.cs
Outdated
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Runtime/Components/NetworkTransform.cs
Outdated
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Runtime/Components/NetworkTransform.cs
Outdated
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Runtime/Components/NetworkTransform.cs
Outdated
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Runtime/Components/NetworkTransform.cs
Outdated
Show resolved
Hide resolved
NetworkSpawnManager: Relative to spawning only, process deferred messages after post spawn. NetworkTransform: Synchronize the SwitchTransformSpaceWhenParented flag when it changes on the authority side. Perform an early check in CheckForStateChange for changes to SwitchTransformSpaceWhenParented. Apply changes to SwitchTransformSpaceWhenParented when processing a state update on non-authority instance.
…calspace' of https://github.com/Unity-Technologies/com.unity.netcode.gameobjects into fix/networktransform-autoswitchspace-forcing-updates-localspace
Co-authored-by: Amy Reeve <[email protected]>
…orm.cs Co-authored-by: Amy Reeve <[email protected]>
…orm.cs Co-authored-by: Amy Reeve <[email protected]>
…orm.cs Co-authored-by: Amy Reeve <[email protected]>
…e-forcing-updates-localspace
A complete refactoring of how parenting is handled when NetworkTransform.SwitchTransformSpaceWhenParented is enabled to provide a complete 1:1 match of (n) back-to-back parenting actions and/or many parenting actions that occur over several frames. This preserves the order of operations, sends 1 full state update plus an added parenting directive per action immediately, and then upon receiving the non-authority instances will apply the parenting, transform the local values and interpolators' queued entries between transform spaces (world to local, local to world, or local to local).
|
/ci ngo |
|
/ci ngo |
More hidden white spaces...
|
/ci ngo |
|
/ci ngo |
…e-forcing-updates-localspace
…e-forcing-updates-localspace
…e-forcing-updates-localspace
…e-forcing-updates-localspace
…e-forcing-updates-localspace
…e-forcing-updates-localspace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR was genuinely a joy to review ![]()
So many nice things in here I couldn't begin to list them all. Most of my comments are small nit picks. Overall this looks so clean and nice and wonderful I don't even have enough words to say how much I like it.
com.unity.netcode.gameobjects/Documentation~/components/helper/networkrigidbody.md
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Documentation~/TableOfContents.md
Outdated
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Documentation~/components/core/networkobject.md
Outdated
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Documentation~/components/core/networkobject.md
Outdated
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Documentation~/components/core/networkobject.md
Outdated
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Runtime/Components/NetworkTransform.cs
Outdated
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Runtime/Messaging/Messages/NetworkTransformMessage.cs
Show resolved
Hide resolved
…orm.cs Co-authored-by: Emma <[email protected]>
…etworkobject.md Co-authored-by: Emma <[email protected]>
Co-authored-by: Emma <[email protected]>
Co-authored-by: Emma <[email protected]>
Co-authored-by: Emma <[email protected]>
HelpURL tests now check to see if the document exists before failing if it can't be loaded from the latest documentation update. Adjusted the HelpUrls base portions of the URL so they are internal.
Using System.IO.File. Migrating into the testproject's runtime tests. Encapsulating within UNITY_EDITOR define. Removed the iPhone platform exclusion.
Co-authored-by: Emma <[email protected]>
…ater.cs Co-authored-by: Emma <[email protected]>
Purpose of this PR
This PR resolves the issue where setting SwitchTransformSpaceWhenParented to true and then setting InLocalSpace to true will force the motion authority to continually send updates each tick (whether there is a delta or not).
Jira ticket
MTTB-1584
fix: #3653
fix: #3646
fix: #3645
Changelog
NetworkTransform.SwitchTransformSpaceWhenParentedis enabled and the associated NetworkObject is parented multiple times in a single frame or within a couple of frames.NetworkTransform.SwitchTransformSpaceWhenParentedwhen it is updated by the motion model authority.NetworkDeliveryused by all messages is now reliable fragmented sequenced with the exception of named, unnamed, and any messages sent with a user specified network delivery type. This assures certain order of operations to be preserved when same call-stack changes are applied to a newly spawned, authority side, NetworkObject.Documentation Included
Testing & QA (How your changes can be verified during release Playtest)
NetworkTransformAutoParenting)NetworkTransformOrderOfOperationsto validate other edge case scenarios:Functional Testing
Manual testing :
Manual testing doneAutomated tests:
Covered by existing automated testsCovered by new automated testsDoes the change require QA team to:
Review automated tests?Execute manual tests?Provide feedback about the PR?If any boxes above are checked the QA team will be automatically added as a PR reviewer.
Backports
This is an NGO v2.x.x specific issue. No backport is required.