public void ReceiveTransform(NetworkTransform nTransform)
    {
        //if (interpolator!=null)
        {
            // interpolating received transform
            interpolator.ReceivedTransform(nTransform);

            //lastBoneTransformRotation = boneTransformRotation;
            //boneTransformRotation = nTransform.rotationBone;

            //lastMovementTransformRotation = movementTransformRotation;
            //movementTransformRotation = nTransform.rotationMovement;
        }

        /*else
         * {
         *      //lastMovementTransformRotation = movementTransformRotation;
         *      movementTransformRotation = nTransform.rotationMovement;
         *
         *      //lastBoneTransformRotation = boneTransformRotation;
         *      boneTransformRotation = nTransform.rotationBone;
         *
         *      myTransform.position = nTransform.position;
         *      myTransform.localRotation = nTransform.rotation;
         *      movementTransform.localRotation = nTransform.rotationMovement;
         *      boneTransform.localRotation = nTransform.rotationBone;
         * }*/
    }
Example #2
0
 public void ReceiveTransform(NetworkTransform ntransform)
 {
     if (interpolator != null)
     {
         // interpolating received transform
         interpolator.ReceivedTransform(ntransform);
     }
     else
     {
         //No interpolation - updating transform directly
         thisTransform.position = ntransform.Position;
         // Ignoring x and z rotation angles
         thisTransform.localEulerAngles = ntransform.AngleRotationFPS;
     }
 }