Search Unity

Audio In-Game "security camera" with audio

Discussion in 'Audio & Video' started by Fauxtrot, May 18, 2018.

  1. Fauxtrot

    Fauxtrot

    Joined:
    Aug 19, 2015
    Posts:
    3
    I have been trying to find a solution for this issue that doesn't involve using a third-party tool like FMOD/Wwise, but so far no luck. What I would like to be able to do is set up a camera in a game that acts like a CCTV or security cam, with that camera also picking up the sound from its own location. From another isolated place in the scene, the player should be able to see that camera's feed on a screen (render texture, took care of that) and also hear what the camera hears as well, from some speakers sitting in the room with the player.

    My immediate thought process was "oh, there must be a way to set up a second listener that feeds its input to an audio source, and possibly use the mixer to apply high pass filtering", but I was very wrong. So far, the built-in audio tools that I've looked at seem unsuited for this kind of problem. I really would rather not have to use a complicated set-up for this seemingly simple problem, but if you do know how to set something like this up, I would love to know either way.

    Visual demonstration in case something was lost in explanation: One room has a capsule person listening to a conversation by some capsule creeps caught on camera in another room, with some filtering applied to the audio. How do dis?
     
  2. hjohnsen

    hjohnsen

    Joined:
    Feb 4, 2018
    Posts:
    67
    Perhaps this could work with a 2D audio source ; the sound should not be attenuated by the distance or the position and could be heard from a great distance. So, perhaps, you can set that specific audiosource to 2D when entering the camera room and set it back to 3D when leaving the room.

    hj.