Final Changes + Updates
- nathanenglish
- Mar 18, 2023
- 2 min read
Updated: Mar 18, 2023
Time to start doing some cleanup + quality-of-life updates before the due date.

First, I changed the current one-dimensional blend tree to a 2D one, where the emotions are placed on a coordinate plane and can be blended between more naturally. the Idle emotion state is at (0,0) and the others are placed at equal coordinates surrounding the origin.
Now, the animator is controlled by 2 parameters instead of one (for the X,Y coordinates of the blend tree). So I have my script change these parameters, and use Time.deltaTime to change the emotions slowly over time using a coefficient called changeEmotionSpeed. Changing this coefficient to 0 makes the emotion switches instantaneous, and 1 makes them very slow. It's sitting at 0.5 right now, which is a good enough speed for the face to change while he considers his next response.

Ideally, this setup could let me do more dimensional blending between emotions. For example, if he were sad for one response, but then curious for another, I could have his face land in the midway point between sad and curious, and he'd express traits of both. I could do this by using some variable that would increase or decrease based on how many times in a row a certain emotion is expressed. So if, for example, he got three angry responses in a row, he'd grow gradually angrier in the face until he reached Maximum Angry. I want to look at a system like this before its time to turn this project in.
'Umm's and 'Hmm's
I tried adding a command to make Raith speak some little filler words while in his "thinking" state. This is done simply enough by adding one command: speaker.Speak("Insert String Here"). The only problem, and the reason why I had to add Raith's "thinking" state in the first place, is that the TTS takes time to respond. Even something as simple as Speak("Um") takes a few seconds. And by the time the "Um" is ready, his original response is ready too. The "Um" ends up overriding his proper response. So it's not worth generating the TTS in real time. It doesn't look like the Speak() method returns anything in the script, so my idea of generating an AudioClip at start time that could be played anytime may not work either. booo.
Texture Fixes and Finishes
I fixed some of his textures, including his eyeball texture, his hands, his all-important freckles, and some details like lace and embroidery.
I also:
Fixed the Text UI so it stays a constant size when the program is full screen.
Attempted to run a build but got some funky errors that seem too complex for me to solve at the moment. I'll see what works, but otherwise this may have to just run inside the Unity editor (which I always expected would be the case, given some of the packages I'm using).
EDIT: Got the build to work by updating Visual Studio and installing a C++ development tool for whatever reason. But it runs now :)
Comments