- Home /
How can i fix the camera in multiplayer game?
The camera works fine, but it's work in wrong side. I look him camera and he can control him character and that happen on the other side. So we can control our character but we look wrong camera. How can I fix this? Thanks
I don't know but I found a network tutorial and I started a new project. Now the main problem is that the camera doesn't follow the character but in the tutorial worked(the main camera found the car and followed it but this camera didn't follow my character)
Answer by YeOldeSnake 1 · Dec 29, 2010 at 11:54 AM
use NetworkView.isMine on awake to enable/disable the cameras you dont control , like
var myCam:GameObject; function Update(){
if(!NetworkView.isMine){
myCam.camera.enabled=false;
}
}
This isn't working for me, I have the camera with that script attached and Network view attached. Any ideas? I was testing it out earlier. If there is two players, Player1 joins and everything is fine, but when Player2 joins Player1 sees Player2's camera and Player2 sees Player1's camera.
Answer by TheGameObject · Dec 18, 2010 at 07:27 PM
change your inputs classes to define what controller is which. then change each characters input definition in scripts like "GetButtonDown("Jump") or "GetAxisRaw("Horizontal") == 1" to whatever u $changed the input definitions to
Make sure u dont actually change the input classes only add more then configure them.
thanks your answer but if I change inputs the camera remains wrong
Your answer
Follow this Question
Related Questions
fps multiplayer camera set (posible script) 1 Answer
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
TPS camera in multiplayer... 2 Answers
Increase camera Zoom 1 Answer
Animating Unity camera? 2 Answers