Skip to content

Commit 02128fa

Browse files
fix: Sync transform position on spawn (#3361)
<!-- Replace this block with what this PR does and why. Describe what you'd like reviewers to know, how you applied the engineering principles, and any interesting tradeoffs made. Delete bullet points below that don't apply, and update the changelog section as appropriate. --> <!-- Add short version of the JIRA ticket to the PR title (e.g. "feat: new shiny feature [MTT-123]") --> [MTTB-90](https://jira.unity3d.com/browse/MTTB-90) [MTTB-1131](https://jira.unity3d.com/browse/MTTB-1131) <!-- Add RFC link here if applicable. --> ## Changelog - Fixed: Correctly sync network transform using world space on spawn ## Testing and Documentation - No tests have been added. --------- Co-authored-by: Noel Stephens <[email protected]>
1 parent d0f73d4 commit 02128fa

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

com.unity.netcode.gameobjects/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
1414

1515
### Fixed
1616

17+
- Fixed initial `NetworkTransform` spawn, ensure it uses world space. (#3361)
1718
- Fixed issue where `AnticipatedNetworkVariable` previous value returned by `AnticipatedNetworkVariable.OnAuthoritativeValueChanged` is updated correctly on the non-authoritative side. (#3322)
1819

1920
### Changed

com.unity.netcode.gameobjects/Components/NetworkTransform.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2785,7 +2785,7 @@ public override void OnNetworkSpawn()
27852785

27862786
Initialize();
27872787

2788-
if (CanCommitToTransform && UseHalfFloatPrecision)
2788+
if (CanCommitToTransform)
27892789
{
27902790
SetState(GetSpaceRelativePosition(), GetSpaceRelativeRotation(), GetScale(), false);
27912791
}

0 commit comments

Comments
 (0)