Fixed an issue where the mouth wouldn't open through camera tracking with hybrid lipsync in OpenSeeVRMDriver.

This commit is contained in:
Emiliana 2020-08-22 12:29:42 +02:00
parent 91b1c35a12
commit 1de282308f

View file

@ -263,7 +263,7 @@ public class OpenSeeVRMDriver : MonoBehaviour {
}
float weight;
OVRLipSync.Viseme current = GetActiveViseme(out weight);
if (current == OVRLipSync.Viseme.sil && weight > 0.9999f) {
if (current == OVRLipSync.Viseme.sil && (weight > 0.9999f || weight < 0.0001f)) {
if (wasSilViseme) {
if (hybridLipSync && Time.time - startedSilVisemes > silVisemeHybridThreshold) {
ApplyMouthShape();
@ -273,10 +273,12 @@ public class OpenSeeVRMDriver : MonoBehaviour {
startedSilVisemes = Time.time;
}
wasSilViseme = true;
Debug.Log("Got sil");
} else {
if (wasSilViseme)
startedSilVisemes = Time.time;
wasSilViseme = false;
Debug.Log("Not sil " + current + " " + weight);
if (hybridLipSync && Time.time - startedSilVisemes < silVisemeHybridThreshold)
ApplyMouthShape(true);
}