mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkTransportChild - ?: (#209)
This commit is contained in:
parent
7ec94c79b1
commit
4fee160b6c
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user