Skip to content

Commit ad0e6b4

Browse files
fix
Fixing issue with synch when SwitchTransformSpaceWhenParented is disabled.
1 parent 3199d5a commit ad0e6b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3160,7 +3160,7 @@ internal void ApplyUpdatedState(NetworkTransformState newState)
31603160
// depending upon if the interpolator is still processing a state or not.
31613161
if (!m_LocalAuthoritativeNetworkState.UseHalfFloatPrecision)
31623162
{
3163-
var newTargetPosition = Interpolate ? m_PositionInterpolator.GetInterpolatedValue() : m_LastStateTargetPosition;
3163+
var newTargetPosition = (Interpolate && SwitchTransformSpaceWhenParented) ? m_PositionInterpolator.GetInterpolatedValue() : m_LastStateTargetPosition;
31643164
var position = m_LocalAuthoritativeNetworkState.GetPosition();
31653165
if (m_LocalAuthoritativeNetworkState.HasPositionX)
31663166
{
@@ -3178,7 +3178,7 @@ internal void ApplyUpdatedState(NetworkTransformState newState)
31783178
}
31793179
m_LastStateTargetPosition = newTargetPosition;
31803180
}
3181-
3181+
31823182
UpdatePositionInterpolator(m_LastStateTargetPosition, sentTime);
31833183
}
31843184

0 commit comments

Comments
 (0)