- Home /
One camera in multiplayer?
Can we use more cameras than one in Unity networking? For example a player drives a car and we can see the car from outside (Third Person View ). Then, we can see the world from inside (as if we were inside the car). The player can switch the cameras during a game. I tried to do so, bu the second camera isn't recognized on clients, only on host. Is there only one camera for one player in Unity networking?
You could make an animation for the camera, so you would only use one and the only thing you would need to do was a script.
Thank you for your answer. I wished to know if ONLY ONE camera is allowed to use in Unity networking because I haven't seen any examples with two or three cameras. So is it impossible to add the second camera? Only tricks with one camera?
Answer by romantotal · Jan 15, 2017 at 08:50 AM
Try reading this post for I think this person does a great job explaining 'Cameras' in multiplayer. http://answers.unity3d.com/questions/616669/using-different-cameras-in-network.html
Answer by jeango · Oct 07, 2016 at 07:20 AM
Hello, a Camera is just like any other GameObject, so there's no reason for it to be restricted to "only one".
Did you put a networkidentity to your camera? I think your problem is that your camera exists on the server instead of on the client. It has to be on the client (local player authority), so that each client sees through its own camera.
You could also use a prefab camera that would be instantiated by the client when he gets inside the car.
Thank you. It's interesting. So is it possible to use more than one camera in Unity networking. So how to switch between the cameras in script? Just like in a game without multiplayer?
Your answer
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
camera layer issue, multiplayer. 1 Answer
Assign spawned object to SmoothFollow target 1 Answer
Multiplayer camera switch issue 0 Answers
Multiplayer Client Missing Reference To Spawn Object 1 Answer