private void Update()
 {
     if (IsNotAnAuthoritativePlayer())
     {
         myRigidbody.MovePosition(Vector3.Lerp(myRigidbody.position, transformComponent.Data.position.ToVector3(), 0.2f));
         myRigidbody.MoveRotation(Quaternion.Euler(0f, ComponentUtils.DequantizeAngle(transformComponent.Data.rotation), 0f));
     }
     else if (isRemote)
     {
         TearDownRemoveTransform();
     }
 }
Пример #2
0
 private void UpdateTransform()
 {
     myRigidbody.MovePosition(transformComponent.Data.position.ToVector3());
     myRigidbody.MoveRotation(Quaternion.Euler(0f, ComponentUtils.DequantizeAngle(transformComponent.Data.rotation), 0f));
 }
 private void SetRotation(uint rotation)
 {
     transform.rotation = Quaternion.Euler(0f, ComponentUtils.DequantizeAngle(rotation), 0f);
 }