Skip to content

Commit

Permalink
Tweak some emotion parameters for better usability
Browse files Browse the repository at this point in the history
- Changed smile2 to smile1, so user smile triggers Chan's "big smile"
- Increased thresholds for anger and disgust. You can now make her
frown with a mild anger expression.
  • Loading branch information
stevehunnicutt committed Mar 5, 2016
1 parent 5c21f45 commit 569d1af
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Assets/UnityChan/Scripts/FaceUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ void Update ()
anim.SetLayerWeight (1, current);
} else if (playerEmotions.currentSmile == dominantEmotion) {
if (playerEmotions.currentSmile > 60) {
Debug.Log ("smile2@unitychan");
anim.CrossFade ("smile2@unitychan", 0.1f);
Debug.Log ("smile1@unitychan");
anim.CrossFade ("smile1@unitychan", 0.1f);
} else {
Debug.Log ("smile1@unitychan");
anim.CrossFade ("smile1@unitychan", 0.1f);
}
} else if (playerEmotions.currentAnger == dominantEmotion) {
if (playerEmotions.currentAnger > 10) {
if (playerEmotions.currentAnger > 40) {
Debug.Log ("angry2@unitychan");
anim.CrossFade ("angry2@unitychan", 0.1f);
} else {
Expand All @@ -69,12 +69,12 @@ void Update ()
Debug.Log ("sap@unitychan");
anim.CrossFade ("sap@unitychan", 0.1f);
} else if (playerEmotions.currentDisgust == dominantEmotion) {
if (playerEmotions.currentDisgust > 10) {
Debug.Log ("disstract2@unitychan");
anim.CrossFade ("disstract2@unitychan", 0.1f);
} else {
if (playerEmotions.currentDisgust > 50) {
Debug.Log ("disstract1@unitychan");
anim.CrossFade ("disstract1@unitychan", 0.1f);
} else {
Debug.Log ("disstract2@unitychan");
anim.CrossFade ("disstract2@unitychan", 0.1f);
}
} else if (playerEmotions.currentValence == dominantEmotion) {
Debug.Log ("conf@unitychan");
Expand Down

0 comments on commit 569d1af

Please sign in to comment.