Currently, I am in the process of creating an array of sounds utilizing PositionalAudio:
var newSound = new THREE.PositionalAudio(listener);
newSound.setBuffer(buffer);
newSound.setRefDistance(20);
newSound.autoplay = true;
newSound.setLoop(true);
soundArray.push(newSound);
I have connected these sounds to cubes on the screen. However, I want the user to only hear the sound if they are directly facing the cube within a 30-degree angle. Anything outside of this cone should not produce any sound.
While referring to the documentation here, I have noticed that only the 'setRefDistance' parameter is functioning properly. The other parameters do not seem to be working as expected. I am currently using r74 version of the software.
Do you have any suggestions or solutions for this issue? For more details, please refer to the gist found at: https://gist.github.com/evejweinberg/949e297c34177199386f945549a45c06