예제 #1
0
 private IEnumerator BlendEmotionsCoroutine(BBFacePose start, BBFacePose target)
 {
     TargetEmotionPose = target;
     for (float i = 0; i < BlendingTime * 3; i += BlendingStep)
     {
         currentEmotionOnly = BBFacePose.Lerp(start, target, DefaultPose, i / (BlendingTime * 3));
         CurrentPose = MixLipSyncAndEmotion(currentLipsyncOnly, currentEmotionOnly);
         DisplayPoseOnModel(CurrentPose);
         yield return new WaitForSeconds(BlendingStep);
     }
 }
예제 #2
0
        private IEnumerator BlendLipSyncCoroutine(BBFacePose one, BBFacePose two)
        {
            BlendingLipSync = true;
            TargetLipSyncPose = two;
            for (float i = 0; i < BlendingTime; i += BlendingStep)
            {
                currentLipsyncOnly = BBFacePose.Lerp(one, two, DefaultPose, 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;
        }