I’m currently making a multiplayer game with some huge terrains. Last night while testing the terrain I realized that the Vector3 is too imprecise thanks to float.
So I read a couple of post suggesting to move the world instead of the player. I did a quick demo and it seemed to work pretty good. The only problem I can see, before I try to implement this on the server side, is that the server still has to use the players real position. Therefor the imprecision will still apply to the server. How can I handle this?
Mentally separate the coordinate system used for the positioning of objects in the world and the display of the world. The display/rendering is handled by Unity. It has to do what it does, and use floats for positioning of objects. Moving the player to the world origin, and moving the world by an equal amount is an approach to help with the rendering. For the modelling/server side, perhaps you can add a script that used doubles for all coordinates.
Yea, but the point is I want to use unity physics server side, and not having to implement my own physics. And as far is I know there isn’t a easy way of swapping out the transform-class or anything? And then again using doubles on the server side would require it to sync doubles over the network.