Closed ChildoftheBeast closed 1 year ago
I think you'd be better off using VRC_ObjectSync in those cases. The way that SmartObjectSync works is it puts each object into a state and lets the state govern how the object moves. These states are things like, a freefall state or a held in left hand state. Because the behavior of the object in these states is well known it lets us optimize. For example, when an object is in freefall, we only need to know the object's starting position and velocity to accurately model it. No need for teleporting every frame or sending constant network updates the way VRC_ObjectSync does.
If you're moving the object every frame with another script, we can't predict how the object will move without doing the calculation locally or sending constant network updates. In this scenario, I think you're better off just editing AquaFloat so only the owner does the calculation and then using VRC_ObjectSync to sync to remote players.
If you think there is a way to optimize then I'm open to working with you to figure that out, but I don't see any obvious way to make it better.
Also just to clarify, the states aren't predefined and I include a ton of example custom states like being stuck to another object being attached to an avatar, but these are all these with very clearly defined and predictable behavior.
We were asked today about compatibility between one of our prefabs, Aquafloat, and SmartObjectSync.
During testing we found that since only the owner was calculating the Physics for the respective pickup, that desync would occur. We fixed this by applying the physic calculations locally on every client instead of it being ran by just the Owner and then expecting ObjectSync to update the changes for remote players.
This isn't an ideal solution as running the Physics for objects is a lot of overhead and adds up quickly with multiple objects, so it would be better to have the changes from the object pushed to remote objects via sync instead. There also appeared to be object desync on latejoiners until the pickup was picked up after they joined. We didn't do enough testing to find out if this was related or not.
If you would like to add support for objects that need a more continuous sync/custom physics, and would like a copy of Aquafloat, please reach out over Discord and I'll be happy to supply you a copy for testing. discord id:
childofthebeast