Repository navigation
fix: Auto configure rigidbody based on physics mode selection - #4229
Merged
Merged
Conversation
NoelStephensUnity
marked this pull request as ready for review
October 28, 2026 17:13
…across authority changes - AlwaysRun interpolation override now applies only when the session has hybrid prefabs (N4E defaults to AlwaysRun, so plain NGO sessions were affected), only to 3D Rigidbodies, and is reapplied on every kinematic/ownership update instead of being reset to the authored value. - Restores the authored kinematic capture for hybrid prefabs to Awake only, so OnDestroy no longer restores the runtime kinematic state. - Guards both NetcodeConfig.Global reads against a missing config, and compiles the full tick smoothing change only when a physics module is present.
EmandM
approved these changes
Oct 28, 2026
EmandM
enabled auto-merge (squash)
October 28, 2026 20:16
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## develop-3.x.x #4229 +/- ##
=================================================
- Coverage 76.20% 76.16% -0.04%
=================================================
Files 159 159
Lines 27576 27598 +22
=================================================
+ Hits 21013 21021 +8
- Misses 6563 6577 +14
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Uses the cached authority that UpdateOwnershipAuthority refreshes on spawn and on every ownership change, so an owner-authoritative body extrapolates on its owner and stops on the server.
jabbacakes
approved these changes
Oct 29, 2026
|
|
||
| ## Mixed mode objects and physics | ||
|
|
||
| To avoid visual anomalies, NGO automatically adjusts some Rigidbody settings based on the **Physics Run Mode** of the `NetcodeConfig` asset: |
Contributor
There was a problem hiding this comment.
Suggested change
| To avoid visual anomalies, NGO automatically adjusts some Rigidbody settings based on the **Physics Run Mode** of the `NetcodeConfig` asset: | |
| To avoid visual anomalies, Netcode for GameObjects automatically adjusts some Rigidbody settings based on the **Physics Run Mode** of the `NetcodeConfig` asset: |
Comment on lines
+93
to
+94
| - **Always Run**: In a session that has hybrid prefabs, non-hybrid NGO prefabs with a NetworkRigidbody and a 3D Rigidbody have the Rigidbody's **Interpolate** value set to **Extrapolate** on the authority instance and to **None** on all non-authority instances. The authority instance is the server or host for a server-authoritative NetworkTransform, or the owner for an owner-authoritative one. The value follows authority when ownership changes, and the original value is restored when the instance despawns. | ||
| - **User Controlled**: Hybrid NGO prefabs with a NetworkRigidbody have **Full Tick Smoothing** set to **Disabled**. |
Contributor
There was a problem hiding this comment.
Suggested change
| - **Always Run**: In a session that has hybrid prefabs, non-hybrid NGO prefabs with a NetworkRigidbody and a 3D Rigidbody have the Rigidbody's **Interpolate** value set to **Extrapolate** on the authority instance and to **None** on all non-authority instances. The authority instance is the server or host for a server-authoritative NetworkTransform, or the owner for an owner-authoritative one. The value follows authority when ownership changes, and the original value is restored when the instance despawns. | |
| - **User Controlled**: Hybrid NGO prefabs with a NetworkRigidbody have **Full Tick Smoothing** set to **Disabled**. | |
| - **Always Run**: In a session that has hybrid prefabs, non-hybrid Netcode for GameObjects prefabs with a NetworkRigidbody and a 3D Rigidbody have the Rigidbody's **Interpolate** value set to **Extrapolate** on the authority instance and to **None** on all non-authority instances. The authority instance is the server or host for a server-authoritative NetworkTransform, or the owner for an owner-authoritative one. The value follows authority when ownership changes, and the original value is restored when the instance despawns. | |
| - **User Controlled**: Hybrid Netcode for GameObjects prefabs with a NetworkRigidbody have **Full Tick Smoothing** set to **Disabled**. |
This file contains hidden or 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
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.
Purpose of this PR
Prevents the visual issues NGO users currently see with Rigidbodies in hybrid sessions, under either N4E
NetcodeConfigphysics mode, by applying two temporary workarounds automatically.Always Run: Non-hybrid NGO prefabs that use a
NetworkRigidbodyjitter or ghost, because the Rigidbody's own interpolation no longer lines up with when physics steps. When a session has hybrid prefabs, these instances now use Extrapolate on the transform authority and None on every other peer. The setting follows authority across ownership changes and kinematic updates, and the authored value is restored on despawn.User Controlled: On the host, full tick smoothing holds hybrid prefabs with a
NetworkRigidbodyin place, so they don't move. Full tick smoothing is now disabled on those prefabs when they are registered, and a developer-level log says so.Both are temporary. The User Controlled workaround will be removed once unity/unity#135166 ships in the next N4E update.
PR Scope:
NetworkRigidbodyBase: the Always Run interpolation override for non-hybrid 3D Rigidbodies, applied only when the session has hybrid prefabs (N4E defaults to Always Run, so plain NGO sessions must not be affected).NetworkPrefab.Validate: the User Controlled full tick smoothing change for hybrid prefabs with aNetworkRigidbody.ghostobjects.md: documents both behaviors.Out of scope:
Jira ticket
NA
Changelog
NA
Documentation
ghostobjects.md.Testing & QA (How your changes can be verified during release Playtest)
Functional Testing
Manual testing :
Manual testing done: in NGO examples under both physics modes, including an owner-authoritative non-hybrid prefab with a Rigidbody.Automated 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.
Up-port
No up-port
Backports
No back-port