예제 #1
0
        public void Update()
        {
            if (mySceneGraph == null)
            {
                if (EskyClient.myClient != null)
                {
                    mySceneGraph = EskyClient.myClient.GetComponent <EskySceneGraphSync>();
                    mySceneGraph.AddIDToList(ID, this);
                }
            }
            else
            {
                if (UpdatesViaNetwork)
                {
                    switch (SyncType)
                    {
                    case SceneGraphPoseSyncType.Instant:
                        transform.localPosition = localPositionNetwork;
                        transform.localRotation = localRotationNetwork;
                        break;

                    case SceneGraphPoseSyncType.Interpolate:
                        transform.localPosition = Vector3.MoveTowards(transform.localPosition, localPositionNetwork, Time.deltaTime * SmoothingTranslationValue);
                        transform.localRotation = Quaternion.RotateTowards(transform.localRotation, localRotationNetwork, Time.deltaTime * SmoothingRotationValue);
                        break;
                    }
                }
            }
        }
예제 #2
0
 public void Update()
 {
     if (mySceneGraph == null)
     {
         if (EskyClient.myClient != null)
         {
             mySceneGraph = EskyClient.myClient.GetComponent <EskySceneGraphSync>();
             mySceneGraph.AddHandIDToList(HandID, this);
         }
     }
     else
     {
         if (isNetworkSync)
         {
             NetworkHandInfo.UpdateHand(myHandGraph, SynchronizeType, TranslationSmoothModifier, RotationSmoothModifier);
         }
     }
 }