- Home /
Networking: Remove client-side delay when commanding server
Okay, i guess as networking is hard this question has been asked a lot but i cant find the answer anyway.
Im setting up a simple 2 player coop game. I got 2 guys running around shooting with weapons. In the player controller i call [Command] CmdFire to make them shoot. The hosts' action is nicely replicated on the client. However, when the client fires its weapon, it does not itself spawn the bullet prefab, but instead commands the server to do so, resulting in a delay between movement and actual shooting, "bending" the stream of bullets for the client player. I hope this was comprehensive.
I want more of a peer to peer behavior, where the client just spawns the bullet, makes it fly without delay, and tells the host to replicate that stuff for itself. The local player, whether host or client, should spawn their bullets in real time and have authority on whether something was hit or not.
Help!
Your answer
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
Shoot Projectile Where Camera Faces [PLEASE HELP!] 2 Answers
Multiplayer reaction time game with no delay? 0 Answers
UNet Shooting Projectiles easy method? 0 Answers
Spawning objects in multiplayer game 1 Answer