- Home /
Many camera objects or Set Position of one camera perfomance
Hello, I have a game where different rooms will require camera to be at different angles, fov, position, script etc.
Now I was thinking about best way to approach this, Easier option seems to be to just place many camera objects, one for each room and then only have one camera enabled at a time via script.
another more complicated option I thought of is to have one camera and reposition/re-set settings of it for each room. I could have dummy CameraTarget objects, and I could store required info in them, then move/set main camera to CameraTarget position and settings.
from difficulty/developer friendliness point of view, first is better for my game. Script is easier to write, and I can preview what is seen through each camera easily. But will there be any performance downside for this?
Answer by ncallaway · Jan 06, 2014 at 08:31 AM
Having several Cameras in a scene won't hurt performance as long as you only have one Camera enabled at a time.
Keep in mind that creating a Camera with the menu "GameObject" > "Create Other" > "Camera" will create a GameObject with several components attached. One of those components will be an Audio Listener. Really, you should only have a single Audio Listener in the scene (it doesn't have to be a Camera). So, if you go with the "many Cameras" approach, you might want to detach the Audio Listener from the Camera. You'll need to come up with a system for moving an object that contains an Audio Listener to the position of the currently active Camera.
Thanks, Would Enabling/Disabling of audio listener as well as camera work or does it have to persistently be one one active gameobject?
Honestly, I haven't tested this out myself. Based on this answer: http://answers.unity3d.com/questions/267213/there-are-2-audio-listeners-in-the-scene-please-en.html it sounds like you can have many, as long as only one is active at a given time.
Your answer
![](https://koobas.hobune.stream/wayback/20220613125649im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to make camera position relative to a specific target. 1 Answer
Rotation seems to pass through condition checks 1 Answer
[Solved]How to change camera perspective ? 1 Answer
Camera only renders to textures once modified during Play (from Inspector) 1 Answer
How do you position an object relative to the camera? 0 Answers