AudiokineticのコミュニティQ&AはWwiseやStrataのコミュニティ内でユーザ同士が質問・回答をし合うことができるフォーラムです。Audiokineticテクニカルサポートチームからの回答をご希望の場合は、必ず サポートチケットページ をご利用ください。

+1 支持
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.
ヒロシ (110 ポイント) General Discussion
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

0 支持
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!
Nikola Viel (1.6k ポイント)
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.
...