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.

Change Listener from Camera to Character UE4

+2 votes
Greetings,

Im trying to change the listener in our game from the camera, which is the default setting, to the character mesh. Any leads would help greatly. I should mention that I'm using UE 4.16.3 and Wwise 2017.1.2.6361 and I'm implementing Audio in C++.

And thank you.
asked Nov 2, 2017 in General Discussion by Aissa B. (280 points)
edited Jan 6, 2023 by Aissa B.
Incredible that this has 1000 views but no answer after 3 years. I'm having this issue currently. Where if I add the character as the default listener and remove the CameraManager as a default listener. I get a crash in AkComponent's TickComponent function. Would like to get an answer for this.

2 Answers

0 votes
 
Best answer
I just learned this today while fiddling around in the Wwise Adventure Game 301 certification course. I removed the Ak Audio Listener script from the Main Camera prefab and simply applied the same script to the Player model prefab and checked the "Is Default Listener" box. And in the Ak Game Obj script component (that is being automatically applied when adding the Ak Audio Listener) you should deselect "Environment Aware".
This seems to work for me. I ran around inside the Library section and it is clearly the Player that is the listener now - camera movement doesn't effect any audio.
answered Dec 29, 2022 by Robert E. (550 points)
selected Jan 6, 2023 by Aissa B.
In the future please refrain from answering a question about Unreal Engine with an answer for Unity. There is no goddamn AkAudioListener script in Unreal. This answer is a complete non-answer.
+1 vote
You'll need to modify in C++ the function `UAkAudioDevice::OnActorSpawned`. This function gets bound to UWorld's OnActorSpawned delegate and that function checks to see if the spawned actor is a player camera manager owned by the local player, and if it is, it adds an AkComponent to the player camera manager and adds that component as a default listener. Don't know why tf people are responding with Unity answers...
answered Jan 19 by Mike P. (890 points)
...