How to (script) sound occlusions, diffraction and accurate reverb for a project?

I’m trying to make a building with fire alarms. Whenever I set them off, the sound comes through the walls as if there is no wall there. How can I fix this? I would like to make proper reverb effects for each alarm and have walls block out the sound of the alarms. Please help

i’ve been messing with dynamic sound; and the only way i’ve found to achieve this is a combination of both the distance you are from the object, and how many studs of wall are in the way via some complicated raycast math

1 Like

Do you have any idea how to script it? I am only a basic scripter :confused:

well if you want to not figure out all the complicated math (because i surely haven’t), then you can just raycast repeatedly, add the hit item to a table of ignore parts, until the part with the sound is reached; then just take the thickness of the parts in the tables and have the sound muffled according to that

other than that, no sorry i dont