Skip to content

Commit 885452a

Browse files
fix
If half float precision is enabled, then update the current half float position state after transforming the current position due to a change in the NetworkObject's status.
1 parent 473fcd8 commit 885452a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4492,6 +4492,11 @@ internal void UpdateParenting(NetworkObjectReference parent, bool worldPositionS
44924492
m_RotationInterpolator.ConvertTransformSpace(m_PreviousParent.transform, false);
44934493
m_PreviousParent = null;
44944494
}
4495+
4496+
if (UseHalfFloatPrecision)
4497+
{
4498+
m_HalfPositionState.UpdateFrom(ref m_InternalCurrentPosition, m_CachedNetworkManager.LocalTime.Tick);
4499+
}
44954500
}
44964501

44974502
/// <summary>

0 commit comments

Comments
 (0)