Questions et réponses de la communauté

Bienvenue sur le forum de questions et réponses d'Audiokinetic, propulsé par la communauté. C'est l'endroit où les utilisateurs de Wwise et Strata s'entraident. Pour obtenir une aide directe de notre équipe, veuillez utiliser la page « Tickets de soutien ». Pour signaler un bug, utilisez l'option Bug Report dans l'Audiokinetic Launcher. (Veuillez noter que les rapports de bug soumis au forum questions-réponses seront rejetés. L'utilisation de notre système de rapport de bug dédié garantit que votre rapport est vu par les bonnes personnes et a les meilleures chances d'être corrigé.)

Pour obtenir rapidement les meilleures réponses, suivez ces conseils lorsque vous posez une question :

  • Soyez précis : qu'essayez-vous de réaliser ou quel est le problème spécifique que vous rencontrez ?
  • Pensez à inclure les détails importants : incluez des détails tels que les versions de Wwise et du moteur de jeu, le système d'exploitation, etc.
  • Expliquez ce que vous avez essayé de faire : indiquez aux autres les mesures que vous avez déjà prises pour essayer de résoudre le problème.
  • Concentrez-vous sur les faits : décrivez les aspects techniques de votre problème. Se concentrer sur le problème aide les autres personnes à trouver rapidement une solution.

0 votes
Hello!

I've searched around a lot but I can't find anyone talking about this topic.

I'm building character interaction in Unity where I'd like characters to talk to you if you're close and yell if you're far away. Ie, I would like to trigger different voice tracks depending on distance. I don't want to use a blend container, since I don't want to change sound as you move closer. I just want to start the right sound depending on the distance to the target at that moment.

I'm looking for a best practice for this. Is there any nice way to do this in Wwise, or should I code this entirely in Unity and just use Events?
dans General Discussion par Petter S. (140 points)

1 Réponse

+1 vote
 
Meilleure réponse

Hey Petter, 

There's many ways to do this, but this is definitely possible both using Events or by coding.
If you don't need the granularity between far and close, you can make a Switch, and then set the Switch from either...

- An Event that sets the Switch.
Make a Switch with two switches (far and close), assign the Switch in a Switch Container and then right-click the Switch Container > New Event > Set Switch. 

- Or from code like this: 
public Ak.Wwise.Switch Switch_Far;
public Ak.Wwise.Switch Switch_Close;
... and then from a function, use the .SetValue(). Just make sure to set the switch before you post the sound itself, and also on the same game object. 

There's also more on Switches in the Wwise-301 course
If you want to learn more about the differences between States, Switches and Game Parameters, try watching this One Minute Wwise video.

Let us know if this helps!

par Mads Maretty S. (Audiokinetic) (40.2k points)
sélectionné par Mads Maretty S. (Audiokinetic)
Another note. You could also set an RTPC based on the distance, and then connect that RTPC to a switch. This would allow you to control when something is "far" or "close" inside Wwise, instead of inside Unity.
Sorry, never managed to answer this. Tried out the different versions and used most of them at different place. Thank you very much for the suggestions!
...