menu
 

La section Questions et réponses de la communauté Audiokinetic est un forum où les utilisateurs de Wwise et de Strata peuvent poser des questions et répondre à celles des autres membres de la communauté. Si vous souhaitez obtenir une réponse de la part de l'équipe de soutien technique d'Audiokinetic, veillez à utiliser le formulaire de Tickets de Soutien.

+1 vote
Hi,

I want to fluctuate the value of MaxDistance for certain AttenuationCurves depending on the game situation.
However, in the current state of Wwise, MaxDistance cannot be controlled by RTPC.
Is there any way to vary the MaxDistance of specific AttenuationCurves from the program side?
Or, if there is another way, I would like to know about it.
dans General Discussion par ヒロシ (110 points)
In Unity I managed to do this using AkSoundEngine.SetScalingFactor(gameObject, float). To call this function I had to register the gameObject first and because I do this it doesn't automatically create an AkGameObj component during runtime. This is what I call on Awake to scale the distance with my GameObject transform scale:
        gameObject.AddComponent<AkGameObj>();
        AkSoundEngine.RegisterGameObj(gameObject);
        AkSoundEngine.SetScalingFactor(gameObject, transform.lossyScale.x);

https://www.audiokinetic.com/en/library/edge/?source=SDK&id=ak_soundengine_registergameobj.html

https://www.audiokinetic.com/en/library/edge/?source=SDK&id=ak_soundengine_setscalingfactor.html

1 Réponse

0 votes
A work around would be to have a switch with your different situations for a given sound and have a different attenuation for each blend/situations under that switch (Same sound, different attenuations). This workflow does not scale well though...

Would be nice indeed to be able to vary the attenuations with an RTPC!
par Nikola Viel (1.6k points)
I am looking to do something similar - there is a node in Unreal "Set Attenuation Scaling Factor" - but it seems this will apply to all sounds playing on that AK Component.

In my case, I would like to use a switch (or RTPC) to select a specific attenuator when triggering a sound. Would save me a lot of trouble if I could do this on whole categories of sounds.... because yeah, duplicating thousands of sounds into switch containers would be a lot of busywork to manage.
...