- Home /
Client side prediction, rigidbody.velocity, photon network
I'm developing a multiplayer game using Photon and I'm having big trouble synchronizing player on server on client.
For now I move the player on unity's Update loop, something like this
rigidbody.velocity = new Vector2(inputBlackboard.Move.x. 0, inputBlackboard.Move.y);
This inputBlackboard data is sent to server and same code runs there. The server keeps desynchronizing with the client, I guess because of update rate. I'm stuck at it and don't really know how to move forward.
I went through Christian Arellano's post and was wondering if same results could be achieved if I keep on moving my player like that? (rigidbody.velocity)
Maybe moving my player when I receive input packages on server? A fixed time update loop?
I tried working with an input buffer but didn't know how to handle transformData when it got back to client, if I was directly setting transform.position that would be simple, butonly dealing with rigidbody.velocity I got completely lost.