Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

AkAmbient inconsistent attenuation in Unity

0 votes
I have a simple scene (well the scene isn't simple, but ambient sounds on it are) containing 3 ambient sounds. Each of those is random container containing a looped sound. Each of those containers use the same attenuation set controlling volume and spread. Their range is set in away preventing those attenuation spheres not to overlap. When a listener moves between them, their volume gradually increase and panning changes. With the exception of one of those sound sources which is heard no matter where the listener is - the sound is heard everywhere whereas other sources are only audible if the listener enters their attenuation spheres.

Why one of those sounds behave differently when all sounds use the same settings for the attenuation? Do ambient sound sources require any other components beside Ak Ambient and Ak Game Obj? Does Unity integration allow to track objects in Game Object 3D viewer?

Update: I did some further investigation and it seems that one sound object that is affected doesn't update positioning when the listener's position change (two other objects on the scene work correctly). I can pause the game and move the offending sound object on the scene and notice attenuation and positioning changes. But when I move the listener, the sound stays the same.
asked Aug 27, 2015 in General Discussion by Maciej M. (510 points)
edited Aug 28, 2015 by Maciej M.

1 Answer

0 votes
 
Best answer
Good catch, there's a bug in 2015.1 with listener management in Unity.  We'll be fixing it in 2015.1.2, releasing in the coming weeks.
answered Aug 28, 2015 by Mathieu J. (Audiokinetic) (7,120 points)
selected Aug 28, 2015 by Maciej M.
Is this fixed in 2015.1.2? I don't see anything related in the changelog. Also, now my remaining positioned sounds don't play correctly after update, but I also did some significant changes in the scene so I may also responsible for the problems.
This should be fixed in 2015.1.2, as stated in the Unity integration release notes (here: https://www.audiokinetic.com/library/2015.1.2_5457/?source=Unity&id=pg__releasenotes.html ).

The migration to 2015.1.2 has a step to set the listener of AkGameObj components to L0. If you are still encountering problems, make sure to properly set the Listener of your AkGameObj components in their inspector.
Okay, I got everything running but the problem has not been fixed. I have 3 localized sound sources in the scene, all using the same attenuation settings. Two of those work properly - they are heard only when the listener is withing their max distance. One is heard everywhere and is not reacting to the listener's movement.

I used Game Object Profiler and added watches for those 3 objects and listener to verify that what I see in the game matches what Wwise sees. The one of the objects only update it's position related stuff if I move the object - it remains oblivious to the listener's position changes.
When connected to your game, go to the "Listeners" tab in the Advanced Profiler window (under the Profiler layout). Find the GameObject causing you trouble. Are other listeners than L0 checked for this game object? If this is the case, you need to find the associated GameObject in Unity. In the inspector window, look for the AkGameObj component. Under the "Listeners" dropdown, make sure only "L0" is checked.
You were right, the troubling object had Everything as the listener. But I've encountered another problem - my Listener component get removed when the game is run and everythin starts to work incorrectly. If I save the level with listener removed I get that situation permanent.

Does any code manipulate listeners? I remember some option to automatically add listener to the camera but I can't find it now. Anyway, this is ultra annoying as my listener isn't attached to the camera and I don't want it to be removed.
...