Adding NPC audio
As mentioned in the previous section, adding audio to our People_Prototype
prefabs really allows us to have a wholesome experience because we can populate our scenes with people, and then when you walk close to them, you’ll be able to hear them talk about different things. We can utilize this within our VR experience so that it doesn’t sound dull and boring. We can download an asset that allows us to have a variety of different dialogues and voices in different tones. Then, we can randomize that and apply it to the different prefabs. Using an algorithm similar to the car audio, we can have an algorithm that generates audio randomly, based on the tone and voice that we choose, creating variability in the audio that comes from different people.
In this section, we will create an audio source for our People_Prototype
prefab and use the downloaded voices to create a dialogue system that allows us to choose whether a person is angry, sad, happy, or glad...