3D Sound and Volume Settings in UE5: Fading with Distance, and a Slider for Music Alone

Created: 2026-07-20Last updated: 2026-09-06

Build a campfire that gets quieter as you walk away, plus sliders that adjust music and effects separately. Sorts out Sound Attenuation, Listener, Sound Class, and Sound Mix, and diagrams the Blueprint wiring plus Submix and reverb.

A distant campfire sounds like it is right beside you. Lower the music and your footsteps go quiet too. Once sound is playing, the next thing to arrange is "where, and how loudly, it is heard".

We build change with distance and per-category volume separately. The former uses Sound Attenuation; the latter uses Sound Class and Sound Mix.

Volume changing with distance, and per-category adjustment for music and effects

What You'll Learn

  • Building a campfire that gets quieter as you walk away, with Sound Attenuation
  • Where the position that hears sound (the Listener) actually is
  • Raising and lowering music and effects separately with Sound Class and Sound Mix
  • How Submix and Audio Volume shape a room's reverb

We first get the campfire fading with distance. Then we add music and effects sliders and confirm both effects in the same level.

Sponsored

Does the sound have a place it comes from?

Music should sound the same as the camera moves. A campfire should get louder as you approach it. That difference decides your playback method.

Comparing position-independent 2D playback such as music with positional playback such as a campfire

2D playback does not use how position in the world affects what you hear. It suits music and button clicks. A stereo clip's left-right spread carries over as is.

Positional playback is for footsteps, campfires, explosions. On top of it you add distance-based volume and direction settings.

NodeExample useReturn value for later control
Play Sound 2DA one-shot button clickNone
Play Sound at LocationAn explosion left at that spotNone
Spawn Sound 2DMusic you want to stop laterAudio Component
Spawn Sound at LocationA fixed-position sound to control laterAudio Component
Spawn Sound AttachedA sound that follows a moving objectAudio Component

An Audio Component is the part for controlling a playing sound. Store a Spawn node's return value in a variable and you can call Stop on that sound later. The Play Sound nodes have no such return value.

Here we use an Ambient Sound Actor for a fixed-position ambience. It is an Actor for placing and playing a sound, testable without calling playback nodes from Blueprint.

Sound Waves as audio material and Sound Cues that assemble playback are covered in the Sound Wave and Sound Cue article.

Hands-On 1: quieter as you leave the campfire

Use a walkable level such as the Third Person template. Prepare a wide floor and place one Cube as a landmark. You can run the audio experiment without campfire visuals.

Prepare the sound and the placement

  1. Import a looping campfire sound and name the Sound Wave SW_Fire . A mono clip without separate left and right makes direction easiest to check at first.
  2. Open SW_Fire and turn on "Looping".
  3. Set "Virtualization Mode" to Play When Silent .
  4. Drag SW_Fire into the level and put the created Ambient Sound at the Cube's position.
  5. Turn on the Ambient Sound's "Auto Activate" and set Volume Multiplier and Pitch Multiplier to 1.0.

Looping repeats the clip when it ends. Auto Activate makes that Actor start playing when Play begins. The two have different roles.

Play When Silent keeps playback running even while inaudible. In this small experiment it makes it easy to return to an audible state after leaving the range or setting the volume to 0. Audio processing continues while silent, so revisit how you use it for large numbers of ambiences later.

Assign an attenuation asset

Attenuation is making a sound quieter with distance. Create a Sound Attenuation asset gathering those settings.

Right-click in the Content Browser, choose "Sound Attenuation" from the audio category, and name it ATT_Ambient .

PropertySetting
Enable Volume AttenuationOn
Attenuation FunctionLinear
Attenuation ShapeSphere
Inner Radius300
Falloff Distance1500
Enable SpatializationOn
Spatialization MethodPanning

Set the created ATT_Ambient in the placed Ambient Sound's "Attenuation Settings". Leave "Override Attenuation" off and "Allow Spatialization" on.

Override Attenuation is the switch that overrides settings for that placement only. We use the shared asset's values, so leave it off.

A Linear setup: multiplier 1 up to 3 m, fading to 0 by 18 m, and 0 beyond

Sphere is a spherical range. Inner Radius is from the center to where attenuation begins, and Falloff Distance is the width beyond that. The default unit is cm, so our range works out to:

Distance to the listening positionVolume multiplier under this Linear setup
Up to 3 m1.0
3 m to 18 mDrops from 1.0 to 0 with distance
Beyond 18 m0

300 + 1500 = 1800 cm, or 18 m. The key is not reading 1500 as "distance from the center".

Save and Play, then walk away from the Cube. Loud up close, quieter as you leave, and audible again as you return means the first stage worked.

Linear is a curve where the multiplier drops by a constant amount per constant distance. We chose it because the result is easy to grasp. Other curves like Natural Sound treat the out-of-range case differently depending on settings. Do not apply "0 at 18 m" to every curve.

Distance from what, exactly?

Volume distance is measured to the Listener, the position of the game's "ears" . It is normally on the camera.

Separating the third-person character from the camera behind it, showing the distance from source to Listener

In third person, the camera trails behind even as the character approaches the source. That is why measuring 18 m from the character's feet does not exactly match what you hear. Think in terms of distance in space, height included.

Also, spatialization is the setting that gives direction, so "a sound on the left is heard from the left". Our Panning represents direction through the balance between outputs. It is separate from distance attenuation, so you can use only one of them.

Stereo clips can be spatialized too, but the spread between left and right channels comes into play. Starting with a mono campfire makes approaching, leaving, and turning sideways easiest to hear.

Sponsored

Separate music and effects with Sound Class

Next we make it possible to lower only the music while the campfire stays put. That uses a Sound Class, the categorization that groups sounds by kind . Effects here means sound effects like footsteps and campfires.

Create three Sound Classes from the Content Browser's audio category.

AssetIts role here
SC_MasterThe parent gathering music and effects
SC_BGMGroups the music
SC_SEGroups campfires and footsteps

Open SC_Master and add SC_BGM and SC_SE to Child Classes. Leave each Class's Volume and Pitch at 1.0 for now.

Placing the music and effects Classes under SC_Master and classifying clips into each

Sound Classes have their own Volume. Changing the parent's volume affects children, letting you organize overall and per-category volume. We keep the Classes' base values at 1.0 and let Sound Mix carry runtime changes.

Import a looping music track and name it SW_BGM . Configure the two Sound Waves as follows.

AssetSound ClassLoopingVirtualization Mode
SW_BGMSC_BGMOnPlay When Silent
SW_FireSC_SEOnPlay When Silent

New sounds may be assigned the project's default Class. Naming something BGM or SE does not classify it automatically, so check each sound's "Sound Class".

Change the volume multiplier with Sound Mix

A Sound Mix is an asset gathering volume and other adjustments applied to Sound Classes. It can hold a change like "music at 0.5, effects at 1.0".

Create a Sound Mix from the Content Browser's audio category and name it SM_UserAudio . Open it and add these two entries to Sound Class Effects.

Sound Class ObjectVolume AdjusterPitch AdjusterApply to Children
SC_BGM1.01.0On
SC_SE1.01.0On

Set the Mix's "Initial Delay" and "Fade in Time" to 0 and "Duration" to -1. That uses it as a setting that never times out after activation.

1.0 leaves it as is and 0 silences it. 0.5 halves the audio signal, which is not the same as "half as loud perceptually".

Push Sound Mix Modifier activates that Mix. We call it once at level start. There is no need to call it every time a slider moves.

Use Set Sound Mix Class Override to change values. Override here means "rewrite that Mix's adjustment for a Class".

SM_UserAudio holds per-Class multipliers, Push activates it, and Set Override rewrites it

Hands-On 2: build music and effects sliders

Now we show a small volume panel in the current level. Music plays, and two sliders rewrite SM_UserAudio. It is a test UI for comparing without stopping the game.

The finished result: music and effects sliders in the top left, used near the campfire

1. Create the Widget

A Widget is a UI element shown on screen. Here we gather two sliders into one volume panel.

Create a Widget Blueprint from "User Interface" in the Content Browser and name it WBP_AudioSettings . Place a Canvas Panel in the Designer, add a Vertical Box as its child, and position it top left. The Canvas Panel is the placement base and the Vertical Box stacks children vertically.

Inside the Vertical Box, place Text "BGM", a Slider, Text "SE", and a Slider, top to bottom. Name the two sliders Slider_BGM and Slider_SE .

Slider propertySetting
Min Value0
Max Value1
Value1
Is VariableOn
Is FocusableOff

Keep the panel sized to a portion of the screen. Set the Canvas Panel's Visibility to "Not Hit-Testable (Self Only)" so the child sliders remain operable. A full-screen Border is not needed here.

Is Focusable is off so the sliders do not keep receiving keyboard input. That makes it easy to return to the 3D view and walk around after touching the volume.

2. Split the startup work into three

Open the Level Blueprint from the level toolbar. Connect Sequence to Event BeginPlay and use "Add pin" to give it three outputs: Then 0, Then 1, Then 2.

Sequence advances execution through its outputs top to bottom. Here we split it into audio setup, UI display, and input setup. It does not mean "wait until the music finishes".

Advancing from BeginPlay through a Sequence to prepare audio, UI, and input in order

The diagrams below split the branches from that one Sequence . You do not need three BeginPlays or three Sequences.

3. Then 0: activate the Mix and play the music

From Then 0, wire white exec through Push Sound Mix Modifier → Play Sound 2D .

NodeSettings
Push Sound Mix ModifierIn Sound Mix Modifier = SM_UserAudio
Play Sound 2DSound = SW_BGM, Volume Multiplier = 1.0, Pitch Multiplier = 1.0
Activating the Mix, then playing position-independent music

We keep it playing in one level for comparison, so Play Sound 2D is fine. To extend to stopping or switching tracks, hold Spawn Sound 2D's return value instead.

4. Then 1: display the panel

From Then 1, wire Create Widget → Add to Viewport .

Set Create Widget's Class to WBP_AudioSettings and connect Get Player Controller (Player Index = 0) 's Return Value to "Owning Player". Connect Create Widget's Return Value to Add to Viewport's Target.

A Player Controller is the Actor handling a player's input. Here we fetch the first player with Index 0 and create the panel as theirs.

Specifying your Player Controller as Owning Player to create the Widget, then adding it to the viewport

Create Widget's return value is the panel you just made. Passing that panel to Add to Viewport displays it.

5. Then 2: enable both mouse and game input

From Then 2, wire Set Input Mode Game And UI → Set Show Mouse Cursor . You can find Set Show Mouse Cursor by dragging from Get Player Controller's Return Value and searching.

Place a Get Player Controller (Player Index = 0) in this branch too and connect its Return Value to Game And UI's Player Controller and Show Mouse Cursor's Target.

PropertySetting
In Widget to FocusUnconnected
In Mouse Lock ModeDo Not Lock
Hide Cursor During CaptureOff
Show Mouse CursorOn
Setting Game And UI and cursor display on the same Player Controller

Game And UI routes input the UI uses to the UI and passes the rest to the game as well. Showing the cursor alone does not change the input mode, so set both.

6. Rewrite Class volume from the sliders

Return to WBP_AudioSettings and select Slider_BGM in the Designer. Press the "+" on "On Value Changed" in Details' Events.

That event fires when the slider's value changes. Connect its white exec output to Set Sound Mix Class Override and the numeric Value to that node's Volume.

Passing the music slider's Value to Volume and updating SC_BGM's multiplier inside SM_UserAudio
ArgumentSetting
In Sound Mix ModifierSM_UserAudio
In Sound ClassSC_BGM
VolumeThe event's Value
Pitch1.0
Fade in Time0.1
Apply to ChildrenOn

Fade in Time is the number of seconds to move from the current volume to the new one. Here 0.1 seconds keeps it smooth.

Add On Value Changed to Slider_SE and build the same connections. The only difference is In Sound Class = SC_SE . Both specify SM_UserAudio as the Mix.

Compile and save the Blueprints. Both the sliders and the Mix start at 1.0, so both sounds play at their original multipliers at first.

Sponsored

Confirm how it sounds

Play close enough to hear the campfire and operate the sliders. To walk after adjusting, click the 3D view outside the panel first, then use WASD.

What to tryWhat you hear
Music to 0.5Only the music gets quieter; the campfire is unchanged
Effects to 0The campfire goes silent while the music keeps playing
Effects back to 1The campfire returns
Both at 1, walk away from the fireThe music stays the same; only the campfire fades
Approach the campfire againThe campfire gets louder again
Confirming per-category volume changes and distance attenuation as the Listener moves away, separately

Finally, stop Play and change SW_Fire's Sound Class to SC_BGM once . Play again and the music slider now also lowers the campfire. That confirms "which slider changes what" is decided by the sound's Class assignment. Set it back to SC_SE afterwards.

Shape reverb with Submix and Audio Volume

The hands-on so far adjusts distance and volume. When you want to process several sounds together, or add a room's reverb, use the following.

Submix: a destination that gathers and processes sound

A Submix is a route that gathers several sounds. Place effects there and the gathered audio is processed together.

Gathering sounds into a Submix, through effects, and out to the final output

Create a Sound Submix asset and add effect presets to its "Submix Effect Chain". On the sound side, specify a destination such as "Base Submix" (Sound Submix in some versions).

EQ , for instance, adjusts the strength of low and high frequencies. A Dynamics Processor shapes volume changes, such as taming loud sounds.

Thinking of a Sound Class as gathering categorization and settings, and a Submix as a route that gathers and processes audio, makes them easy to tell apart. Building our music and effects sliders needs no Submix.

Audio Volume: change reverb by place

Reverb is the lingering reflection you hear in a cave. An Audio Volume is an Actor placed in a level marking a region where reverb and other settings change.

When the Listener enters an Audio Volume covering a cave, it switches to the configured reverb

To try it, place an Audio Volume covering a cave or room and set the following.

PropertyExample setting
Apply ReverbOn
Reverb EffectA Reverb Effect asset you prepared
Volume0.5
Fade Time0.5 seconds

The sound side has to send to reverb too. To try it with the campfire, turn on ATT_Ambient's "Enable Reverb Send", set Reverb Send Method to Manual, and Manual Reverb Send Level to 0.5. Also check "Send to Master Reverb" on the Sound Class.

That is the setting sending part of the sound to reverb processing. Keep the sound playing while the Listener enters and leaves the region and confirm the reverb switches. 2D sounds have their own reverb send settings, so "2D means no reverb at all" is not true.

When it does not work

SymptomWhere to check
The campfire plays once and stopsSW_Fire's Looping and the Ambient Sound's Auto Activate
Nothing changes as you walk awayWhether you are playing in 2D, the ATT_Ambient assignment, Enable Volume Attenuation, Override
Distance and loudness disagreeWhether you measure from the Listener rather than the character, whether it is Linear, how you read 300 and 1500
I cannot tell left from rightEnable Spatialization, Allow Spatialization, the actual source and camera positions
I cannot touch the slidersGame And UI, Show Mouse Cursor, the Slider's Is Enabled, UI covering it
The sliders change nothingWhether the Mix was activated, Override's Mix/Class, the Value → Volume connection
Music and effects drop togetherWhether SW_Fire's Class became SC_BGM, whether you changed the parent Class
Nothing returns after going back from 0Whether the sound is still playing, Looping and Play When Silent
Reverb does not changeThe Audio Volume, the Listener's position, the Reverb Effect, the sound's reverb send

Bonus: when building it into a game

Duck the music only during a menu

To pull sound back only during a menu, separate from user settings, prepare another Mix such as SM_MenuDuck . Set SC_BGM's Volume Adjuster to 0.3, Pitch Adjuster to 1.0, and the Mix's Duration to -1.

Applying a menu Mix that lowers only the music while it is active

Specify the same Mix with Push Sound Mix Modifier when opening the menu and Pop Sound Mix Modifier when closing. Pair Push and Pop and avoid repeating Push while it is open. If you actually pause the game, also check settings that keep audio playing while paused, such as the music's "Is UISound".

Save the setting values

Our sliders return to 1.0 when you restart Play. To keep settings, save the values, read them back at launch, and apply them to both the Mix Override and the sliders' displayed values. That continues into saving and loading and the game settings screen article.

Adjust as sound counts grow

Play When Silent keeps playback processing running while silent. Once you place many ambiences, use it only where needed and revisit it together with Sound Concurrency, which handles simultaneous playback counts.

Also, pushing volume multipliers too high or layering many sounds can distort. Moving where you set volume to a Sound Class does not by itself avoid distortion. Listen to the game's audio together and adjust.

What the player hears and what the AI hears are also separate mechanisms. To notify enemies of noise, use Report Noise Event and the like from the AI Perception article.

Summary

Sound Attenuation shapes how things sound with distance, and Sound Class plus Sound Mix shape per-category volume. Here we confirmed the difference by approaching and leaving the campfire and by moving the music and effects sliders.

As you add sounds, share the attenuation asset among sounds of the same character and classify them into the matching Class. Before adding settings per source, decide "at what distance should this be heard" and "which volume setting should it follow".

Further Reading

Unreal Engine Notes in this section98