How to fix PUN delay

Options
hello
I'm creating a multiplayer boxing game using photon cloud with unity (PUN). I identified little delay between client and MasterServer. due to that delay I'm unable to
identified collusion detection in proper way. i fixed the position sync problems by using using NetworkRidgetbody.
still unable to sync player states same time.(I'm changing character animation based on state.)
Does anyone knows how to fix this problem?
cheers

Comments

  • Tobias
    Options
    There is a networking delay that depends on where you are and how your network connection to the server is. This can't be avoided. It's a technical thing.
    All you can do is avoid local lag in the clients.

    If you send RPCs, PUN won't immediately send them off in a package. You could check how PhotonHandler is calling SendOutgoingCommands and do this when you have a special RPC that needs to be sent asap.
    You can hide some lag by sending actions immediately but executing them a bit later on the sender.