Photon - How to sync ball in soccer game

Options
I'm making multiplayer soccer game but I'm having problem with sync I guess. The ball take force from only master. When the other players shoot the ball, it doesn't move because of the lag. I've tried the owner transfer with ontriggerenter2d and it makes more good but when the owner transfer happens, new owner pull the ball to itself. So its not a proper way.

Also I used OnPhotonSerializeView but its not helped to me anyway. How do I fix this?

Comments

  • arjun
    Options
    Hi @anilsadio
    I faced a similar issue when I tried to sync ball across clients. Even though I didn't try the owner transfer method, I used RPC calls to sync ball owner across clients and it worked out pretty well. I am still facing a few lags when any non master client passes or shoots the ball but overall its much better. This might help. https://stackoverflow.com/questions/57090892/ball-sync-issue-photon
  • anilsadio
    Options
    arjun said:

    Hi @anilsadio
    I faced a similar issue when I tried to sync ball across clients. Even though I didn't try the owner transfer method, I used RPC calls to sync ball owner across clients and it worked out pretty well. I am still facing a few lags when any non master client passes or shoots the ball but overall its much better. This might help. https://stackoverflow.com/questions/57090892/ball-sync-issue-photon

    Hi @arjun

    It makes sense but I'm getting error direction at pv.RPC("Shoot", RpcTarget.All, direction, DirectionVector); part. Can you explain how you use that direction?