Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

Camera problem when client joins

$
0
0
Hi,

I was trying to code a simple multiplayer for my game. I got stuck when setting the correct camera for a joined player. When the client player joins my host player the cameras get switched. Camera A for player A is now snapped to player B and vice versa. Here is my code for the player after the prefab:
Code (CSharp):
  1. using UnityEngine;
  2. using UnityEngine.Networking;
  3. using UnityEngine.UI;
  4.  
  5. public class PlayerSetup : NetworkBehaviour {
  6.  
  7.     int counter;
  8.     Camera...

Camera problem when client joins

Viewing all articles
Browse latest Browse all 16796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>