#How do you stop the session host from hogging all the input controls and cameras?
1 messages · Page 1 of 1 (latest)
First, You need to make sure that there is only one active camera in the scene.
Then you need to change Start() to OnNetworkSpawn() in your code. Start runs before the object is spawned on the network
idk the code doesn't even run at all now
the function is just greyed out
sounds like you forgot the override. public override void OnNetworkSpawn()
ok so now there's 2 cameras that can point in 2 different directions but they both follow the same player 
I assume it has to do with the actual target of the camera but I'm not sure how to edit the value of it in the script cuz it has a rly weird type
@white sentinel
There should only be one active camera in the scene. You will need to disable the camera that is spawning with the other player
well I mean like theres only 1 cinemachine camera in the scene
or like wdym
If you are using Cinemachine, there should only be one Virtual Camera that is local. You don't need to know about the other players cameras
yeah but like what am I supposed to disable here?
cuz like theres only 1 cinemachine camera no?
If you only have one main camera and one active virtual camera in the scene then you shouldn't be seeing 2 cameras anywhere. If its part of the player prefab then you'll need to disable it when the player spawns
oh but its not
I just have the cinemachine camera waiting in my scene for people to spawn in
oh hang on, you are not actually seeing 2 cameras.
Post your input code. You probably need to disable inputs on the remote player
A tool for sharing your source code with the world!
input system
Your input is moving the camera and both players. FixedUpdate() needs to check for IsLocalPlayer
idk nothing rly seems to have changed
I assume this is what you meant right?
Your player movement is not a network behavior. How are you setting IsLocalPlayer?
Its fine, you just have to set the IsLocalPlayer property you created somewhere. Or you can use the IsLocalPlayer built into NetworkBehavior
Or you can use the IsLocalPlayer built into NetworkBehavior
isn't that what I'm doing already though?
Yea, what you have there should work fine
^?