在 Audiokinetic 社区问答论坛上,用户可对 Wwise 和 Strata 相关问题进行提问和解答。如需从 Audiokinetic 技术支持团队获取答复,请务必使用技术支持申请单页面。

Change Listener from Camera to Character UE4

+2 投票
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.
最新提问 11月 2, 2017 分类:General Discussion | 用户: Aissa B. (280 分)
修改于 1月 6, 2023 用户: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 个回答

0 投票
 
已采纳
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.
最新回答 12月 29, 2022 用户: Robert E. (550 分)
采纳于 1月 6, 2023 用户: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 投票
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...
最新回答 1月 19 用户: Mike P. (870 分)
...