示例#1
0
 private IEnumerator BlendEmotionsCoroutine(BSFacePose start, BSFacePose target)
 {
     TargetEmotionPose = target;
     for (float i = 0; i < EmotionBlendingTime; i += BlendingStep)
     {
         currentEmotionOnly = BSFacePose.Lerp(start, target, i / (EmotionBlendingTime));
         CurrentPose        = MixLipSyncAndEmotion(currentLipsyncOnly, currentEmotionOnly);
         DisplayPoseOnModel(CurrentPose);
         yield return(new WaitForSeconds(BlendingStep));
     }
 }
示例#2
0
        private IEnumerator BlendLipSyncCoroutine(BSFacePose one, BSFacePose two)
        {
            BlendingLipSync   = true;
            TargetLipSyncPose = two;
            for (float i = 0; i < BlendingTime; i += BlendingStep)
            {
                currentLipsyncOnly = BSFacePose.Lerp(one, two, i / BlendingTime);
                CurrentPose        = MixLipSyncAndEmotion(currentLipsyncOnly, currentEmotionOnly);
                DisplayPoseOnModel(CurrentPose);
                yield return(new WaitForSeconds(BlendingStep));
            }
            TargetLipSyncPose = null;

            currentLipsyncOnly = two;
            CurrentPose        = MixLipSyncAndEmotion(two, CurrentCompleteEmotionPose);
            DisplayPoseOnModel(CurrentPose);

            BlendingLipSync = false;
        }