Hi!
I encountered an issue while using sounds attached to a mesh with a custom attenuation function.
These are the sound options - { loop: true, autoplay: true, maxDistance: 20, volume: 0.3, useCustomAttenuation: true }.
The custom attenuation works fine, but when I call sound.setVolume with the time parameter, the result is buggy.
For example, if I call
sound.setVolume(0.5, 5);
for the next 5 seconds, the volume switches between the gradual increase of the volume to 0.5, and the output volume returned by the custom attenuation function.
In the playground example below, the camera is further than the maxDistance, so once setVolume(0.5, 5);
is called, the volume switches between gradual increase in volume and silence. IMO, ideally any changes to volume will always consult the custom attenuation function, and not work independently.
Please let me know what you think!
Thanks