Ping Pong VR ,which is the best way to sync a ball? PUN2, UNITY

Hi,

i'm trying to include a ping pong minigame in my VR multiplayer app in UNITY,

but i'm having problems with the syncronization of the ball, in fact only the OWNER of the PUN room can se the ball moving smooth, the others can see the ball lagging, so the game is unplayable.

I'v tried to change the OWNER when the ball is hitted but the result is not that good, so i want to sync the ball for everyone in a smooth way.

I will try to share you the but is in ITALIAN so it will be taugh to uderstand, i'm sorry.


Which is the best way to sync a ball? I guess the problem is that the ball react just too the racket gravity.


THE BALL OBJECT has this for the SYNC



The script of the racket when it the ball does this

1) Make the controller Vibrate

2)Direct the ball to the other racket (aimTarget)

3) Set the velocity and the SyncronizedValues for the Photon tranform View Classic Component


Answers

  • but i'm having problems with the syncronization of the ball, in fact only the OWNER of the PUN room can se the ball moving smooth, the others can see the ball lagging, so the game is unplayable.

    PUN isn't the best basis for this. Updating fast moving objects isn't it's strong point, unless you know how to sync this effectively (e.g. immediately send an update when the ball hits a paddle). The ball's position and physical interaction is controlled by the Master Client with a low update rate and no direct connection. At the same time, you can (likely) control your own paddle instantly in VR.

    Look into Fusion for such a case. It will give much better results out of the box and it supports local prediction and reconciliation. You could possibly start with the Fusion Dragonhunter VR Demo.