#Need help with multiplayer

1 messages · Page 1 of 1 (latest)

golden scaffold
#

I've been making a multiplayer prototype using tutorials and chapgpt since I have no knowledge about multiplayer. I use Mirror and fizzySteamwork and my scenes go from MainMenu -> LobbyScene -> Sumo (name of the game). The lobby works fine but once we launch Sumo, nothing works correctly, the host can move/look/attack fine and sees the client move (only move) and the client can't do anything but when he look/attack he sees the host look and attack. (look = player rotates because of the camera). I guess there is a big problem about the infos being sent clients -> host and host -> clients but I just can't seem to figure out what. I can send any scripts or info if needed, here are the relevant scripts I have :

  • PlayerObjectController.cs
  • CustomNetworkManager.cs
  • SteamLobby.cs
  • PlayerMovement.cs
  • CameraController.cs
  • SumoPlayerController.cs

ping me so I can see quicker

native sand
#

1st, don't rely on chatgpt especially for networking stuff.
2nd, you'll need to decide if your movement is going to be server or client authoritative. Are you just sending inputs to the host? Does mirror have a network transform?
Make sure there is only one active camera in the scene on the client. Your player movement needs to check is it's on the local player or maybe disable it if not.

golden scaffold