How can I make an audio source play in stereo, with 3D distance attenuation, but without 3D panning?
As soon as I use the 3D sound settings, Unity turns the audio clip into panned mono, instead of stereo. When I set the spread to 180, the panning is off, but it is still pure mono. (The audio clip setting Force to mono IS unchecked).
Sounds play in stereo to give the illusion of depth to the sound- Just like we have two eyes to let us see how far away something is, we have two ears to hear how far off, and what angle, sounds are coming from. If you play a sound in 3d space, it does not make sense to play it stereo, because all of a sudden it is coming from exactly one point in space- the audio engine then converts the sound back into stereo when it gets sent to the speakers on your computer (so that it sounds like it comes from a point in space). If you want 3D distance attenuation, try just using the sound as a 2D sound, and manually changing the volume in a script which checks the distance to Camera.main.
Another thing, if you want to simulate directional effects on it, you might consider applying a mild low-pass filter on the sound which attenuates depending on whether the listener is pointing towards the audio source- we get a surprising amount of directional information from the weird shape of our ears, which make sounds have different frequency signatures from different directions.
The best solution to this is to treat your stereo sound as coming from 2 “virtual speakers” in 3d space. Unfortunately it’s a pain in the arse in Unity since, as BerggreenDK says, you have to split the sound into two monos and have them come from 2 3d sources - one of the few times when Unreal’s audio implementation wins over Unity since it supports stereo directly (you just specify the distance between the “speakers”). It really depends on the context of what you are trying to achieve what the spacing between the sources should be - but as a guide - if you want it to sound as it would coming from a pair of stereo speakers you want the subtended angle between speakers at the listening position to be about 60 degrees.
Another thing, if you want to simulate directional effects on it, you might consider applying a mild low-pass filter on the sound which attenuates depending on whether the listener is pointing towards the audio source- we get a surprising amount of directional information from the weird shape of our ears, which make sounds have different frequency signatures from different directions.
– syclamothor you can just force the sound clip to mono in the inspector settings
– iitoash