Sounds parented to attachments don't respect emitter size/maxdistance

I’m just writing up something to handle sounds and to make atmospheric sounds around the player, one thing I’ve found is that - if parented to an attachment - a sound doesn’t appear to repect MaxDistance or emitter size.
On the alternative side of that, it appears to treat the sounds as though they belong inside the player’s gui, giving them no real sound position.

EmitterSize and MaxDistance appear to increase in volume the lower they are.
Changing the Emitter size to 0, than to another value will “reset” the sound’s volume to be respective of where the camera currently is in relation to the attchment, but when the camera moves, the volume will not change.

Here is a really simple repro;
SoundAttachments.rbxl (12.7 KB)

Run the game (The sound is already marked as playing & looping) and zoom your camera out as far as you can, this should exceed 100 studs.

Now go into the Explorer and find TESTPART->Attachment->Sound. Alter the MaxDistance property to 100.
Rather than the sound stopping, it will actually increase in volume.

I can only assume that this has something to do with the way that Attachments are handled.

3 Likes

I’ve noticed that if the sound’s “playing” property is enabled before the game instance starts running, it ignores size/maxdistance. But if you enable the ‘playing’ property during the game instance by script, it respects them.

I’ve tested this with both sounds that exist on running, and sounds that only exist post-running, both have the same results for me.

This is still an issue, just recently ran into it.

1 Like

Again, this is still an issue.
Increasing the max distance results in a lower volume.
Decreasing the max distance results in the volume being higher.
Setting the emitter size to anything other than 0 influences the sound, but doesn’t have a very clear way of doing so. 0-100 emitter size seems to influence its overal volume, but in the “playback loudness” property, it has no proper correlation.

This means that unless I run scripts to constantly tweak sounds based on their distance to the player, I am unable to use sounds within attachments. It appears to reflect L/R audio, but doesn’t seem to properly phase out with distance.

1 Like

This is actually intended. With the inverse roll-off modes, min distance (EmitterSize) and max distance control where the sound starts/stops attenuating – i.e max distance is not “where the sound reaches 0 volume”, it’s “where the sound stops decreasing in volume”. See https://www.fmod.com/docs/api/content/generated/overview/3dsound.html for more info.

The real bug here is that sounds using the inverse roll-off modes cut off past max distance when parented to parts. Or maybe whoever implemented min/max distance thought it would be strange that max distance doesn’t seem to work correctly with the default roll-off mode, so they made it cut off past max distance in those modes.

Either way, you should use the linear roll-off modes. They’re a bit less realistic, but the distance settings work as you would expect (min-max distance = 1-0x volume).
Inverse will probably never quite do what you want; if attachment behavior is updated to reflect part behavior, your sounds will strangely “pop in” when you get within max distance, and if it stays as it is, it’s difficult/impossible to control where it cuts off.

4 Likes

I actually had no idea that there were different RollOffModes.
It still seems strange that this is the default if its going to cause issues though.

2 Likes

Is there bug fixed yet or is there a method of fixing this for now? I’ve spent the past day trying to fix this.

Still an issue

Having this problem myself, its really annoying as it mean’s if we want sounds from a specific place, we need to have another part for it, attachments would save that problem

Read my response above.

tl;dr: This is working as intended. If you want a sound to only be heard within MaxDistance, change it’s RollOffMode to one of the linear ones.

2 Likes

Tried both the Linear and LinearSqaure rolloff mode, if anything it made it worse. The max distance wasn’t being followed and the volume was whatever I set it do no matter where I was standing, didn’t get less quiet the further I walked away, any idea’s?

3 Likes