@@ -240,8 +240,7 @@ public void AnticipateState(TransformState newState)
240240 return ;
241241 }
242242 var transform_ = transform ;
243- transform_ . position = newState . Position ;
244- transform_ . rotation = newState . Rotation ;
243+ transform_ . SetPositionAndRotation ( newState . Position , newState . Rotation ) ;
245244 transform_ . localScale = newState . Scale ;
246245 m_AnticipatedTransform = newState ;
247246 if ( CanCommitToTransform )
@@ -336,8 +335,7 @@ public void SetupForRender()
336335 Transform . m_AnticipatedTransform = Transform . m_AuthoritativeTransform ;
337336 }
338337
339- transform_ . position = Transform . m_AnticipatedTransform . Position ;
340- transform_ . rotation = Transform . m_AnticipatedTransform . Rotation ;
338+ transform_ . SetPositionAndRotation ( Transform . m_AnticipatedTransform . Position , Transform . m_AnticipatedTransform . Rotation ) ;
341339 transform_ . localScale = Transform . m_AnticipatedTransform . Scale ;
342340 }
343341 }
@@ -347,8 +345,7 @@ public void SetupForUpdate()
347345 if ( Transform . CanCommitToTransform )
348346 {
349347 var transform_ = Transform . transform ;
350- transform_ . position = Transform . m_AuthoritativeTransform . Position ;
351- transform_ . rotation = Transform . m_AuthoritativeTransform . Rotation ;
348+ transform_ . SetPositionAndRotation ( Transform . m_AuthoritativeTransform . Position , Transform . m_AuthoritativeTransform . Rotation ) ;
352349 transform_ . localScale = Transform . m_AuthoritativeTransform . Scale ;
353350 }
354351 }
@@ -493,8 +490,7 @@ public void Smooth(TransformState from, TransformState to, float durationSeconds
493490 {
494491 m_AnticipatedTransform = to ;
495492 m_PreviousAnticipatedTransform = m_AnticipatedTransform ;
496- transform_ . position = to . Position ;
497- transform_ . rotation = to . Rotation ;
493+ transform_ . SetPositionAndRotation ( to . Position , to . Rotation ) ;
498494 transform_ . localScale = to . Scale ;
499495 m_SmoothDuration = 0 ;
500496 m_CurrentSmoothTime = 0 ;
@@ -505,8 +501,7 @@ public void Smooth(TransformState from, TransformState to, float durationSeconds
505501
506502 if ( ! CanCommitToTransform )
507503 {
508- transform_ . position = from . Position ;
509- transform_ . rotation = from . Rotation ;
504+ transform_ . SetPositionAndRotation ( from . Position , from . Rotation ) ;
510505 transform_ . localScale = from . Scale ;
511506 }
512507
0 commit comments