CamC
Normal2y ago
17 replies
Cam

Are model value updates all received at the same time?

As stated in the title, if I updated multiple values on a model at the same time (Reliable ones for context), would it be guaranteed that on the receiving end that all these values would be received at the same time? I know for unreliable this isn't the case (At least I believe so, correct me if I am wrong), but if this is the case for reliable ones this could help drastically simplify some of my existing code around, which would be great.
As an example, if I had a transform and my model contained position, rotation, and scale. If I set all 3 of these at once, could I consistently expect that they would all be received at the same time?
Solution
all changes made in the same network frame go out in the same packet. even if you hit the max packet size, they’re split but then regrouped on receive as though they were in the same packet.

sets only send delta updates but changes to models within them go out in the same packet.

what the bot is talking about here is that changes are deserialized like this:

for (deltaUpdate in packet) model.value = deltaUpdate.value

so change events end up firing as values are deserialized. so it’s possible for one to fire for propertyA but propertyB hasn’t been updated in the loop yet
Was this page helpful?