Page 1 of 1

Sound problems

Posted: Mon Jan 21, 2019 11:26 pm
by hodirt
Hello. I have two critical problems with sound
I'm using Wwise 2018.1.4
#1. Camera orientation does not affect the 3D sound, but camera position does. Behavior is the same in editor and in game mode (I am building my game over sidescroller template). Does not matter what I use: default cry component TriggerComponent or standard Procedural clip in Mannequin.
Here is typical sound setup in Wwise
Image

#2. 3D Sound is heard only in right or left speaker (doesn't matter, if object is far right/left, or have just a little offset from camera view center).
This happens, when I execute trigger like this, or similar way

Code: Select all

CryAudio::SRequestUserData const userData(CryAudio::ERequestFlags::DoneCallbackOnExternalThread | CryAudio::ERequestFlags::CallbackOnExternalOrCallingThread, this);
m_pIEntityAudioComponent->ExecuteTrigger(nTriggerID, m_audioProxyID, userData);
Does anyone know, how to solve these problems

Re: Sound problems

Posted: Tue Jan 22, 2019 7:20 pm
by cry-thomas
Hi, which build are you using?
When you set

Code: Select all

s_DrawAudioDebug = a
you should see the listener's transformation. Does the rotation change when you rotate the camera?

Re: Sound problems

Posted: Tue Jan 22, 2019 7:53 pm
by hodirt
Thanks. I figured out where was the problem. I was attaching my camera component not to the player, but to the other entity. Then I was applying transformation matrix to the camera component (function SetTransformMatrix) with some offset and 180 deg. orientation on z axis.
So 180 orient had been applying to audio listener (problem #1), but translation, for some reason, hadn't and it stayed at origin of the entity (which was at player feet) (problem #2)

Now I have to make my camera work properly again, but this problem, I believe, is solved.