playMaker

Author Topic: "Cut to Camera" that handles the Audio Listener  (Read 3265 times)

indeed

  • Junior Playmaker
  • **
  • Posts: 87
"Cut to Camera" that handles the Audio Listener
« on: February 21, 2015, 09:44:11 AM »
I am working on a game in which the player jumps to different cameras in a scene. Using the "Cut to Camera" action would be ideal, however, it creates a problem of having multiple Audio Listeners in the scene.

What would be nice is to have the audio listener attached to an empty Game Object, not the camera, and whenever "cut to camera" is called, the single goAudioListener jumps to the position/rotation of the new camera.
« Last Edit: February 21, 2015, 10:41:02 AM by indeed »

indeed

  • Junior Playmaker
  • **
  • Posts: 87
Re: "Cut to Camera" that handles the Audio Listener
« Reply #1 on: February 21, 2015, 10:35:53 AM »
Currently I'm accomplishing this using Cut to Camera paired with Set Parent. My Audio Listener GO is parented to the new camera with local position/rotation reset.

indeed

  • Junior Playmaker
  • **
  • Posts: 87
Re: "Cut to Camera" that handles the Audio Listener
« Reply #2 on: February 21, 2015, 06:20:51 PM »
Just FYI in case anyone else is dealing with multiple cams, been playing around with this today. Unity gets very confused by having multiple cameras. The most effective method I've found for having multiple cameras is to de-activate the entire camera GO and activate another one. This seems to prevent Unity from getting confused about different "depth" levels.

As a result I'm not longer using Cut to Camera at all, but rather "Activate Game Object". My FSM gets the Main Camera and stores it in a variable, de-activates its GO, then activates the new camera GO.