More data than nessecary is stored for VRCObjectSync
tracked
TapGhoul
- Create a PlayerObject with a VRCObjectSync on it
- Move it
- Check saved data (can only with clientsim here)
It seems like a lot more data is saved than necessary. An example:
{
"Position": {
"T": "V3",
"x": 0.5252968,
"y": 1.590979,
"z": -2.009602
},
"Rotation": {
"T": "Q",
"x": 1.541764E-08,
"y": 0,
"z": -8.727196E-11,
"w": 1
},
"Velocity": {
"T": "V3",
"x": 0,
"y": 0,
"z": 0
},
"IsKinematic": true,
"UseGravity": true,
"Discontinuity": "not available",
"DiscontinuityCounter": "not available",
"WasSleeping": true,
"Time": 12.67402,
"HeldInHand": "not available"
}
I don't think attributes such as HeldInHand and WasSleeping should be persisted. UseGravity and IsKinematic are reasonable to store, however.
Log In
Vincil
VRCObjectSync is already an annoying component to combine with other behaviors. For example when VRCObjectSync enters "sleeping" mode it seems to also shut down synching on all the other behaviors on the same game object (at least for Continuous sync).
As a workaround you can try creating a child object that holds the PlayerObject combined with a simple script that manually records only the transform/physics data you need (and then have it apply that data at OnPlayerRestored). One downside to watch out for, however, is that this will close to double the bandwidth usage of your VRCObjectSync objects if you set your simple script to continuous sync as well.
StormRel
tracked
DrBlackRat
PlayerObjects just save all synced variables of every udon behaviour on them, so since those are synced they will also persist.