Skip to content

Commit 53b735c

Browse files
fix: NetworkTransform half float synch (#2791)
* fix Fixing the issue with HalfFloat position not keeping the base position synchronized when using unreliable deltas.
1 parent 1cac76a commit 53b735c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1857,7 +1857,8 @@ private bool ApplyTransformToNetworkStateWithInfo(ref NetworkTransformState netw
18571857

18581858
networkState.NetworkDeltaPosition = m_HalfPositionState;
18591859

1860-
if (m_HalfFloatTargetTickOwnership > m_CachedNetworkManager.ServerTime.Tick && !networkState.IsTeleportingNextFrame)
1860+
// If ownership offset is greater or we are doing an axial synchronization then synchronize the base position
1861+
if ((m_HalfFloatTargetTickOwnership > m_CachedNetworkManager.ServerTime.Tick || isAxisSync) && !networkState.IsTeleportingNextFrame)
18611862
{
18621863
networkState.SynchronizeBaseHalfFloat = true;
18631864
}

0 commit comments

Comments
 (0)