Is it okay to move AudioSources around the scene?

I have a question for you guys that have made bigger, more complex, games than I haha

In my current game I have a series of rooms connected by hallways. In each room there will be an intercom speaker on the center of the ceiling where dialogue will play from an AudioSource.

I was originally planning on have a different AudioSource in each room positioned where these intercom speakers are (it’s a 3D game) and use script to find the appropriate AudioSource to play from based on your progression. But I just got the idea that I could just have one single AudioSource for the intercom system and simply move it to a new location based on player progression. Is this an okay idea or is there any pitfalls I should be aware with this approach?

Definitely okay! a few things to keep in mind:

  • Doppler effect can make things sound weird if the audio source is moving and changing distance to the player when switching to the next intercom
  • If audio is currently playing from one intercom, and you want it to switch to a nearby speaker as the player moves closer to that one, positioning and volume of the audio source needs to be carefully managed
  • It might be a good idea to manually control the panning and volume based on the nearest several audio sources, though this requires a little more work and math! If you don’t need panning though it’s a little easier!