#How do you stop the session host from hogging all the input controls and cameras?

1 messages · Page 1 of 1 (latest)

glad nova
white sentinel
#

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

glad nova
#

the function is just greyed out

white sentinel
glad nova
#

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

white sentinel
glad nova
#

or like wdym

white sentinel
#

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

glad nova
#

cuz like theres only 1 cinemachine camera no?

white sentinel
#

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

glad nova
#

I just have the cinemachine camera waiting in my scene for people to spawn in

white sentinel
#

Post your input code. You probably need to disable inputs on the remote player

white sentinel
#

Your input is moving the camera and both players. FixedUpdate() needs to check for IsLocalPlayer

glad nova
#

I assume this is what you meant right?

white sentinel
glad nova
#

oh I just changed the script into a network behaviour

#

is that bad

white sentinel
glad nova
white sentinel
glad nova