Sound attenuation
For a sound to be played in 3D inside UE5, you’ll have to create a Sound Attenuation asset, as we mentioned previously. A Sound Attenuation asset will let you specify how you want a specific sound to change volume as its distance from the listener increases. Have a look at the following example.
Open Unreal Editor, go to the Audio
folder inside the Content Browser area, right-click, go to the Sounds category, and select Sound Attenuation. Name this new asset BounceAttenuation
:
Figure 9.7 – Creating the Sound Attenuation asset
Open this BounceAttenuation
asset.
Sound Attenuation assets have many settings; however, we’ll want to focus mainly on a couple of settings from the Attenuation Distance section:
Inner Radius
: Thisfloat
property allows us to specify at what distance the sound will start lowering in volume. If the sound is played at a distance less than this value, the volume won’t be affected...