diff --git a/Mirror/Runtime/NetworkTransformChild.cs b/Mirror/Runtime/NetworkTransformChild.cs index 1782e4c9a..cc4b29e41 100644 --- a/Mirror/Runtime/NetworkTransformChild.cs +++ b/Mirror/Runtime/NetworkTransformChild.cs @@ -298,23 +298,13 @@ void FixedUpdateClient() // interpolate on client if (m_LastClientSyncTime != 0) { - if (m_InterpolateMovement > 0) - { - m_Target.localPosition = Vector3.Lerp(m_Target.localPosition, m_TargetSyncPosition, m_InterpolateMovement); - } - else - { - m_Target.localPosition = m_TargetSyncPosition; - } + m_Target.localPosition = m_InterpolateMovement > 0 + ? Vector3.Lerp(m_Target.localPosition, m_TargetSyncPosition, m_InterpolateMovement) + : m_TargetSyncPosition; - if (m_InterpolateRotation > 0) - { - m_Target.localRotation = Quaternion.Slerp(m_Target.localRotation, m_TargetSyncRotation3D, m_InterpolateRotation); - } - else - { - m_Target.localRotation = m_TargetSyncRotation3D; - } + m_Target.localRotation = m_InterpolateRotation > 0 + ? Quaternion.Slerp(m_Target.localRotation, m_TargetSyncRotation3D, m_InterpolateRotation) + : m_TargetSyncRotation3D; } }