示例#1
0
 IKSnapShot GetSnapShot(IKSnapShotType type)
 {
     for (int i = 0; i < ikSnapShots.Length; i++)
     {
         if (ikSnapShots[i].type == type)
         {
             return(ikSnapShots[i]);
         }
     }
     return(null);
 }
示例#2
0
        public void UpdateIKTargets(IKSnapShotType type, bool isLeft)
        {
            IKSnapShot snap = GetSnapShot(type);

            handHelper.localPosition    = snap.handPos;
            handHelper.localEulerAngles = snap.hand_eulers;
            bodyHelper.localPosition    = snap.bodyPos;

            if (snap.overwriteHeadPos)
            {
                headHelper.localPosition = snap.headPos;
            }
            else
            {
                headHelper.localPosition = defaultHeadPos;
            }
        }