Forum Discussion
Deryl_XOXO
7 years agoHonored Guest
Unity Networking - Object Synchronization issues
Hey there,
i'm currently working on creating a Multiplayer VR Game with Oculus Touch, but ran into some Issues with GameObject Synchronization between the Players in the Room. I'm not very experienced in Networking.
What i want to do is Synchronizing GameObjects Position, Rotation and Velocity for all Players in a Room.
I looked at the VRHoops example, adapted the Code and Modified it to my needs.
The Position, Rotation and Velocity for about 50 Objects is sent every 0.1 Seconds by every Player using P2P to the other Players in the Room.
The Synchronization is working... some kind of, but the Problem that shows up is, that the GameObjects flip back and forth when they are Moving or Colliding with other GameObjects. I guess that this happens, because every Player sends "their" current position of the GameObjects to the other Players.
Maybe my approach to synchronize the GameObjects between the Clients is totally wrong, but finding any working examples / documentation / tutorials wich are not using 3rd Party Plugins or arent relying on 3rd Party Servers is nearly impossible (at least for me, but maybe im just searching for the wrong terms).
I hope, that some experienced Networking Dev could help me with this issue, or that someone could maybe pass me an example wich is using the Oculus P2P / Platform to synchronize GameObjects, or could tell me the best way for synchronization.
My next approach if nobody can help me with this will be to use the Unity High Level API, wich im trying to avoid.
I'm using the 1.20.0 Avatar and 1.20.0 Platform SDK (3.4.1?!) on Unity 2017.1.1f1.
i'm currently working on creating a Multiplayer VR Game with Oculus Touch, but ran into some Issues with GameObject Synchronization between the Players in the Room. I'm not very experienced in Networking.
What i want to do is Synchronizing GameObjects Position, Rotation and Velocity for all Players in a Room.
I looked at the VRHoops example, adapted the Code and Modified it to my needs.
The Position, Rotation and Velocity for about 50 Objects is sent every 0.1 Seconds by every Player using P2P to the other Players in the Room.
The Synchronization is working... some kind of, but the Problem that shows up is, that the GameObjects flip back and forth when they are Moving or Colliding with other GameObjects. I guess that this happens, because every Player sends "their" current position of the GameObjects to the other Players.
Maybe my approach to synchronize the GameObjects between the Clients is totally wrong, but finding any working examples / documentation / tutorials wich are not using 3rd Party Plugins or arent relying on 3rd Party Servers is nearly impossible (at least for me, but maybe im just searching for the wrong terms).
I hope, that some experienced Networking Dev could help me with this issue, or that someone could maybe pass me an example wich is using the Oculus P2P / Platform to synchronize GameObjects, or could tell me the best way for synchronization.
My next approach if nobody can help me with this will be to use the Unity High Level API, wich im trying to avoid.
I'm using the 1.20.0 Avatar and 1.20.0 Platform SDK (3.4.1?!) on Unity 2017.1.1f1.
1 Reply
Replies have been turned off for this discussion
- MikeFTrusteeOne approach would be to have only 1 player sync the object at a time. How you chose to do this depends on your game design though.
ex: throwing a ball back and forth, first player to grab the ball gains possession of the network object and relays transforms to all peers. Peers then apply the remote transforms locally. Once the ball is grabbed by another player, that player is now in control and the process repeats itself.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 months ago
- 1 year ago
- 6 months ago
- 8 months ago