- Home /
Make car game to multiplayer
This is the game in web browser. Now it's 2 cars as I want but the camera is mixed, player 1 has player2's car but controls player1'2 car and vice versa. Now even with mixed cars x.x. You'll see if you test it..
I have been thinking if you could add a id to each player that joins and then connect one camera and one car to one id so there wouldnt be all messed up but then again I'm not sure how to make that out of a prefab. Is there any unique id for each player that I could use or?
Some of the scripts: ConnectionGUI RigidAssign Instantiate NetworkRigidbody
[2]: http://download.unity3d.com/support/resources/files/MultiplayerTutorial.pdf
Answer by DasFloX · Dec 25, 2013 at 03:00 PM
Yeah, I know your Problem, i had it too once. Im not sure if it is the correct answer, but as I remember your have to do something like
if(This.NetworkView==My.NetworkView){//set any variable on true that allows the script to run or stop the script at this point if its false}
But im not that sure if the Code is correct like this, it's just what i remember. Hope it helped you :)
Your answer
![](https://koobas.hobune.stream/wayback/20220613080422im_/https://answers.unity.com/themes/thub/images/avi.jpg)