Exemplo n.º 1
0
 private static void ReceiveTarget2(this IHumanoidNetworking networking, byte targetMask, HumanoidControl.TargetId targetId, HumanoidTarget target, Vector3 receivedHumanoidPosition, float deltaPoseTime)
 {
     if (IsTargetActive(targetMask, targetId))
     {
         target.EnableAnimator(false);
         Vector3 transformPosition = target.transform.position;
         ReceiveTransform(networking, target.transform);
         if (deltaPoseTime > 0)
         {
             Vector3 receivedLocalPosition = target.transform.position - receivedHumanoidPosition;
             //UnityEngine.Debug.Log(target.transform + " " + (target.humanoid.transform.position.z - target.transform.position.z));
             target.transform.position = target.humanoid.transform.position + receivedLocalPosition;
             target.main.target.confidence.position = 0.6F;
             target.main.target.confidence.rotation = 0.6F;
             target.main.target.CalculateVelocity();
         }
         else
         {
             target.transform.position = transformPosition;
         }
     }
     else
     {
         target.EnableAnimator(true);
     }
 }
Exemplo n.º 2
0
 private static void ReceiveTarget(this IHumanoidNetworking networking, byte targetMask, HumanoidControl.TargetId targetId, HumanoidTarget target)
 {
     if (IsTargetActive(targetMask, targetId))
     {
         target.EnableAnimator(false);
         ReceiveTransform(networking, target.transform);
         target.main.target.confidence.position = 0.6F;
         target.main.target.confidence.rotation = 0.6F;
         target.main.target.CalculateVelocity();
     }
     else
     {
         target.EnableAnimator(true);
     }
 }