1
\$\begingroup\$

I'm trying to make an audio game where by players can tell the position of an object listening to whether the right or left speaker is playing the audio.

The idea is:

If the object is on the left hand side

Play the audio of that object through the left speaker

Right hand side = right speaker

How would I do this in Unity?

\$\endgroup\$
  • \$\begingroup\$ Unity basically does this out of the box... what have you tried so far? Are you finding it's not working when you just use the basic built in audio source & listener setup? \$\endgroup\$ – DMGregory Oct 1 '17 at 1:14
3
\$\begingroup\$

Unity has a full-fledged system for 3d audio. Take a look at the components AudioListener and AudioSource.

When the game object with the AudioSource is right from the game object with the AudioListener, it will play on the right stereo channel, and when it is left from the AudioListener, it will play on the left.

\$\endgroup\$

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.