VRCBilliards / vrcbce

VRCBilliards: Community Edition
MIT License
307 stars 37 forks source link

PC and Quest sync #81

Open BubbleQuap opened 3 years ago

BubbleQuap commented 3 years ago

I have a problem with the pool table syncing between PC and Quest players. It syncs between Quest Users or PC Users, but not if they are mixed. Is that a intended behavior?

Version: 1.2.1 and 1.1.8

World: https://vrchat.com/home/world/wrld_5e29b707-7656-4813-9928-2a9566c33ff8

FairlySadPanda commented 3 years ago

No it isn't. This can happen if the Quest and PC version of the world have a different heirarchy, so they end up as essentially two different things on the network.

Quest testing has fallen by the wayside in this project (it's hard to do) but I'll take a look this week to confirm that there's no innate issue with sync in cross-platform worlds. If there is it might be a VRChat issue?

BubbleQuap commented 3 years ago

They are at the root in the hierarchy and I use the same prefab for both versions. Every other object syncs fine. I use the Esnya prefab and modified the spawn positions of the cues, the position of the scoreboard and deactivated the logger.

I also reduced the triangle count of the balls to lower it under 300 tries so Unity can batch them dynamically for performance. That reduced the draw calls for all balls to 1. Maybe that could be implemented by default?

I don't own a quest and I don't know anyone who owns one. It makes testing complicated.

Legoman99573 commented 3 years ago

No it isn't. This can happen if the Quest and PC version of the world have a different heirarchy, so they end up as essentially two different things on the network.

It has to do with more than heirarchy as the scenes have to perfectly match (includes hashes and modifying the same material won't harm the scene). As doing myself, the easiest is to use something like easy quest switch instead of 2 separate projects. Even though for me a quest tester isn't hard to find, but it's an inconvenience to those who don't know anyone who has quest.

BubbleQuap commented 3 years ago

Okay, I think it's the project setup then. Thank you for the help.

I feel like it's a ton of work to manage everything in one project. I use different textures, light maps and reflection probe setups in my project. Worst of all being that I use a mesh combiner with different setups for Quest and PC.

Is it a limitation of how photon handles the networking of objects? Why do they use the hierarchy structure for that? It definitely makes working on worlds for Quest and Pc a lot more difficult.

Legoman99573 commented 3 years ago

Why do they use the hierarchy structure for that?

Just how VRChat handles things going over the network and trying to make quest and PC users be able to Collab in the same world and instance. The only thing you got to worry about is anything that is going to be sent over the network like the pool table. Everything else will be just fine if you aren't going to send events for gameobjects over the network like the world.