Right off the bat I’ll admit I’m not super familiar with Unreal’s audio systems, making it difficult me to look up a solution. I’m currently working on a sidescroller game, and I would like to limit the sounds (played in each Blueprint actor like enemies, switches etc.) PER room. Basically, I do not wish to hear the sounds from the second room when I’m in the first, and vice versa, as demonstrated in the image below.
How would one do this?
Thanks in advance!
You can setup audio attenuation, which limits the range at which you can hear a sound. The problem is, it’s approximate and you would be able to hear a zombie if it was right next to the wall and you were on the other side.
A better way might be if the things making a sound, only did it when the player was near them. It’s very easy to tell if the player is close, either using overlaps or measuring vector lengths…
Was hoping for a more elegant solution than having to do a check for each sound played, but I’ll definitely dig further into this. Possibly to detect when the player’s in the same room for example. Thank you for your answer and your help, ClockworkOcean.
Take a look at attenuation, it might be a good fit…
Got it working! Apparently it was as easy as having an attenuation volume big enough to encapsulate the camera. Now I’m hearing sounds only when I’m in that room, as desired.