Attenuation on Character, Spatialization on the Camera -- UE5.1 - Fmod Studio 2.02.11

I’m trying to use the “Set Audio Listener Attenuation Override” node. It’s being called on my player characters blueprint on begin play. However nothing I set seems to have any effect. I’ve even tried setting the location to far far away just to see if anything was happening at all. Breakpoints hit though.

Trying the “Set Audio Listener Override” node in the same place works, but I don’t want to have spatialization on the character, and I don’t want to update things on tick to correct the rotation.

Has anyone found a way to implement this successfully?

Thanks!

SALAO

Hi,

Could you elaborate on the behavior that you are looking for not provided by Set Audio Listner Override?

I created a test, of a 3d emitter with a small attenuation sphere and the desired effect would be that if I stand next to it and pan the camera, the volume would stay the same (but the panning would change based on the camera). However the attenuation seems to stay attached to the camera and you can hear the volume go from 0 to 100 as the camera pans around.

I realize this may be more of an Unreal issue, but I thought maybe someone had come across the same problem here.

Hi,

Thanks for the explanation.
Could you give the following blueprint a try and let me know if this is the behavior you are looking for:

Hope this helps!

1 Like

Thanks Connor, I always appreciate your help. At the moment my programmer has implemented a solution in C++, but for my own sanity sake I will test this method as soon as I’m able.

Cheers

1 Like

Hello Connor, I’m trying to find a solution to the problem brought up in this thread, so I tried using the method you shared but I had no success.
I’m using 4.27 and the latest version of fmod, I don’t have much experience so I might be doing something wrong.

Does the audio listener override work with fmod or is it only for unreal native listener?
If it doesn’t, would changing the listener settings need to be done in C++?

Thanks in advance.

Hi,

The FMOD listener overrides the UE native one so using the listener override node should be setting the position of the FMOD listener.

What is the issue you are experiencing?

Hi Connor, thanks for your reply.

So I tried adding that code and then feeding the character location to the attenuation override and then I would use the camera rotation for the listener override. But it was not behaving as intended.

I found these 2 solutions to the problem:

Maybe there is a simpler way to do it, but I found this to work pretty well. If there is an easier way I would love to know.

Thanks again. Cheers

1 Like

Hi,

I also used the Audio Listener Override Tutorial as a reference so that is a great solution.

If you have any more questions, please do not hesitate to ask!

1 Like

Hi Connor,

unfortunately chiming in here to confirm that in UE 5.5.4 and FMOD Studio 2.03.06 I haven’t been able to get the attenuation to work relative to character, but panning (both rotation and position wise) relative to the camera. We have an isometric game where cameras typically have a huge view of the environment. For us, setting the listener position to where the character is is not a solution as we might have, let’s say, a sound visually happening in the left side of the view (as viewed by the camera) but also at the character’s right. In that situation, we would still want the sound to pan left, not right (which happens because the listener is on the character and even if rotated like the camera it will hear the sound to the right). So what we would really need is for panning calculations to consider the camera position and rotation, not the character’s, and for the attenuation calculations to consider the character’s position. We already tried the SetAudioListenerAttenuationOverride but it behaves very weirdly:

  • used in Tick to set the AttenuationLocationOverride to the character position in combination with the SetAudioListenerOverride that positioned and rotated the listener like the camera did nothing in the sense that attenuation was still calculated relative to the camera;
  • used in BeginPlay with the “attach” pin plugged into the character’s mesh while the SetAudioListenerOverride’s attach pin plugged into the camera…This yielded the weirdest result as attenuation was calculated relative to the character’s position but panning still considered the character’s position and not the camera’s.

I hope I explained everything clearly, we’re really stuck here and thinking of implementing workarounds but it would really be a godsend if we could just make FMOD use the character’s position in its attenuation code, that’s all…

Thanks!

1 Like

Hi,

Thank you for the information. There is a task to add this feature, I have added your interest.

Please let me know how you go implementing a workaround in the meantime and if I can assist.