Ok, so this is a template for people who want a floating-origin solution on BJS 5.x – that is, support for huge scenery (ex: a solar system).
I did not care about visuals at this moment, atm I just wanted to build a reasonable solution which did not require engine changes and was easy to use.
I will be using this on my own planetary project and am giving it away for those interested in having huge scenery support without imprecision far from the origin.
It is still a wip, but the concept works already.
Update: this is in the docs now, with a very simple playground (easier to understand):
Demo: Etherea
Source: GitHub - imerso/bjs_floating_origin: Floating Origin for Babylon.js 5.x
Please don’t get fooled by the demo: the camera is moving at an absurd speed, or you would take hours to fly around that “planet”. Things there are relatively big already, enough to cause floating-point imprecisions. But it solves that by making the camera fixed at origin, and moving the objects instead.
Hope some find it useful.