-
Notifications
You must be signed in to change notification settings - Fork 465
Description
Is your feature request related to a problem? Please describe.
The NetworkTransform syncs its Position/Scale/Rotation every time and with all information. Which really costs a lot of resources if you got several objects that need to be synced over the whole network. For example:
If you never changed your position you still need as much resources as some did that re scaled, moved and rotated.
Describe the solution you'd like
The solution is simple. Buffer the information of the last tick in NetworkTransform and check if a change occurred. If so use a bitmask to determine what has changed and send a flag with a float array from server back to client which unwraps the information.
Like that you only send the smallest amount of information.
Best case: none.
Second best case: One and flag.
Worst case: All information with flag.
Since we can make the flag a byte. The extra amount of traffic is nearly insignificant.
Additional context
We used this method for our Test environment and it improved the traffic a lot.