Throw a ball

Options
Hey!

Im using tracked controller in my new game. To throw a ball is no problem, but the network-tracking for the opponent is not accurate. The ball stutters or flys around (if I try to smooth out the movement). I think the problem is that the ball is tracked over his whole lifetime. Is there a way to say to the opponent (who is not the owner of the object), that the ball is flying in a specific direction and the opponent does the physics on his own? That should smooth out the movement and the ball should hit the same point on both sides?

Comments

  • vadim
    Options
    Hi,

    RPC's are for sending such things to other clients. Disable automatic position update and send initial movement data when trowing a ball. Other clients can calculate ball path basing on given value. Note that for more complicated physics like collisions, different result may be calculated on different clients. So on each collision you need to update ball path from owner again.
    To make calculated paths better synch'ed, instead of RPC receive time, use PhotonNetwork.time change since owner sent a message.