A problem in implementation mirror networking in my multiplayer game
Hello I'm making a new game like Soccer stars using Unity and Node js now. I use Socket.IO plugin for sending and receiving information to the server. To move pieces and ball online on both phones I send a Vector3 that represents the power of the shoot and on the other phone receive this Vector3 from the server and I use AddForce(Vector3, forcemode.impulse) function to apply the force. This method works well up to 7-8 first strokes also the pieces and the ball will place in the same position on both phones but after that their position isn't the same on both phones. for debugging I print the Vector3 position of the pieces after each stroke and see the pieces' positions are not the same number on both phones after 4-5 first strokes. for example, the Y position of the first piece on the first phone is 8.4326f, but on the second phone, it's 8.4321f. Can anyone help me to solve the problem and found the bug? note that I print the Vector3 that represents the power of the shoot on both phones and that was the same Vector numerically. I mean, the numbers are sent and received correctly on the server.
Your answer
Follow this Question
Related Questions
How to make my game multiplayer? 1 Answer
Unity Unet Online V.S. Local 0 Answers
How to push other players throught UNET multiplayer??? 0 Answers
Assign Network Manager an Online Scene with Script 0 Answers
Multiplayer Photon/Pun Issues 0 Answers