Volume Attenuation for 3d events only Z axis?

I have been working with an UE4 dev on a game.
I am able to get the distance parameters / volume attenuation of 3d sound events working in the UE4 game, but for some strange reason i only hear volume changes when the camera changes position/distance in the Z-Axis.

Its not reflecting camera moves on the horizontal plane. This would be essential, since i am hearing the sound of game elements that are offscreen / away from the camera. those sound events are moving in the stereo panorama if our in game character passes them, but they dont change their volume.

Is there a setting or parameter we need to change either in FMOD or UE4 to reflect distance on the horizontal plane?


We found out the reason was the UE4 camera having to be very far away (for visual reasons). Is there a way to put the listener in a a different place as the camera? Like inside our hero character for example and calculate distances / attenuation etc relative to the character? That would solve our issue. If possible, how can that be done?


1 Like

That is an interesting point. I’ll have to check our UE4 and see what we can do here, since it seems very useful to be able to control listener based on the player rather than the camera.

We’ll get back to you with more information soon.

Great! Looking forward to hear more. I am curious: are FMOD audio events using the UE build in listener or do they have their own listener (currently attached to the camera it seems). I asking to find out if this can be set in UE4 or from within FMOD.

Hi, i am curious, are there any news on this subject? Unfortunately it currently keeps us from developing the audio further, and i think its a pretty important thing to be able to configure. Thanks a lot for any hint in the right direction to solving this. D.

I found out some more about listener positions and the FMOD Studio plugin is doing the correct thing of calling player controller GetAudioListenerPosition. You can verify it works by creating a new code top-down project and adding the following function to the player controller class that is created for you:

void AMyCodeTopDownPlayerController::GetAudioListenerPosition(FVector & OutLocation, FVector & OutFrontDir, FVector & OutRightDir)
	APawn* const Pawn = GetPawn();
	if (Pawn)
		FVector ViewLocation;
		FRotator ViewRotation;
		ViewLocation = Pawn->GetActorLocation();
		ViewRotation = Pawn->GetActorRotation();

		const FRotationTranslationMatrix ViewRotationMatrix(ViewRotation, ViewLocation);

		OutLocation = ViewLocation;
		OutFrontDir = ViewRotationMatrix.GetUnitAxis( EAxis::X );
		OutRightDir = ViewRotationMatrix.GetUnitAxis( EAxis::Y );
		Super::GetAudioListenerPosition(OutLocation, OutFrontDir, OutRightDir);

This UDN answer says that for it is only possible to override the listener position on a code project, since it isn’t exposed to blueprints:


1 Like

This is now exposed in the blueprints by accessing player controller, and using set audio listener override