As far as I know, going further than 1M units from the world origin in Unity is hardly possible due to floating point precision issues.
Making a world more than 1M units in radius would require either using double
vars for coordinates or utilizing some space division technique to divide a massive scene into hierarchical chunks with the smallest of them being around 10 000 units, i.e. each world-space position would be expressed by the chunk hierarchy the object's in and a bunch of float
vars representing its local position (and possibly rotation and scaling) inside the last chunk.
Either way, doing this would require implementing a completly new coordinate system, so I'd like to know whether or not that is possible in Unity, and if so, how may I make it work with existing Unity systems like physics and so on.
P.S I can't just move the world into origin as the player moves since I want to have things going on simultaneously around the planet.
Thanks!
GameObject.SetActive ()
), but how do I actually build that chunk-based coordinate system so everything uses it instead of the built-in one? – Maks Maisak Oct 26 '15 at 13:58entity.transform.parent = newChunk;
. Just start with a grid of say 20x20 chunks / flat quads, have a play with that idea, and go from there. Open a new question if you have other thoughts. – Engineer Oct 26 '15 at 14:08