2D Onine Game

Options
Hey all! I'm a new user of PUN and I have some problems. I have made an online game that is about up to four people joining a game and then shooting at each other and it's a one hit kill. The problem is that on my screen I shoot the opponent but on my opponents screen they dodged in last second. So on my screen he is dead but on his he is alive. I use photon serialize and I am lerping to make it more accurate also I have changed the send rate and I don't know how I can fix it now. If you have any kind of advice or a tutorial you could send me to I would be more then happy.

Comments

  • Working on this kind of issues too.
    Think the most important is that you have to decides who decides who has been hit.

    Before I did this by the master I let the receiver check it and if he thought he was hit he would send an RPC that made it look like he was hit for all the players.

    Keep in mind that if the attacker checks the GameObject and destroys it if it hits to other player, but the other player thinks he dodged it the GameObject will be destroyed anyway.