playMaker

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

indeed

  • Junior Playmaker
  • **
  • Posts: 54
    • View Profile
"Cut to Camera" that handles the Audio Listener
« on: February 21, 2015, 07: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, 08:41:02 AM by indeed »

indeed

  • Junior Playmaker
  • **
  • Posts: 54
    • View Profile
Re: "Cut to Camera" that handles the Audio Listener
« Reply #1 on: February 21, 2015, 08: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: 54
    • View Profile
Re: "Cut to Camera" that handles the Audio Listener
« Reply #2 on: February 21, 2015, 04: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.