UnityEngine.Networking.NetworkTransform.InterpolateTransformMode2D C# (CSharp) Method

InterpolateTransformMode2D() private method

private InterpolateTransformMode2D ( ) : void
return void
        private void InterpolateTransformMode2D()
        {
            if (this.m_InterpolateMovement != 0f)
            {
                Vector2 velocity = this.m_RigidBody2D.velocity;
                Vector2 vector2 = (Vector2) (((this.m_TargetSyncPosition - this.m_RigidBody2D.position) * this.m_InterpolateMovement) / this.GetNetworkSendInterval());
                if (!this.m_Grounded && (vector2.y < 0f))
                {
                    vector2.y = velocity.y;
                }
                this.m_RigidBody2D.velocity = vector2;
            }
            if (this.interpolateRotation != 0f)
            {
                float num = this.m_RigidBody2D.rotation % 360f;
                if (num < 0f)
                {
                    num += 360f;
                }
                Quaternion quaternion = Quaternion.Slerp(base.transform.rotation, Quaternion.Euler(0f, 0f, this.m_TargetSyncRotation2D), (Time.fixedDeltaTime * this.interpolateRotation) / this.GetNetworkSendInterval());
                this.m_RigidBody2D.MoveRotation(quaternion.eulerAngles.z);
                this.m_TargetSyncRotation2D += (this.m_TargetSyncAngularVelocity2D * Time.fixedDeltaTime) * 0.1f;
            }
            this.m_TargetSyncPosition += (Vector3) ((this.m_TargetSyncVelocity * Time.fixedDeltaTime) * 0.1f);
        }