menu
 

在 Audiokinetic 社区问答论坛上,用户可对 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.
分类:General Discussion | 用户: ヒロシ (110 分)
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.
...