NetworkTransformreceives the server's positions and then interpolates between them. For a smooth interpolation, we need to exactly reconstruct what happened on the server. For that, we need to know when an object has been at a certain position on the server.
float(or even better, an 8 byte
doublefor higher precision). When synchronizing large worlds, the bandwidth would add up quickly.
NetworkTransformis only one of many components. Several others might need timestamps too, which would increase bandwidth even further.
timestampin every Batch. Instead of including it in every message, we include it once per ~1200 byte batch which is barely noticeable when it comes to bandwidth.
OnMessagehandler was sent by the server via
connectionToServerbecause only the player owned objects have connections to the server. Instead we use the client's
NetworkClient.connectionto server, which is always guaranteed to be there.
OnMessagehandler was sent by the client via