Can I use Real Scale Space Objects With Colliders?

Hi,

I need to make a space simulator. and I use 1unit = 1meter in unity. So my problem is can I make planet with radius of 6400km (or 6400000 unit) with colliders? is it will stuck in consumer computers.

To offer a very shortened description, Kerbal Space Program (made in Unity) had to make a lot of specific exceptions to normal-seeming rules for the game to work well.

Since Unity uses 32-bit floating point values for Transform data (namely, position), they had trouble early on with spaceships blowing themselves apart and being unable to properly interact with planets at the edge of the solar system because their minimum floating point accuracy started to become measured in meters (if not tens of meters).

I don’t know all the details surrounding how they handle all of the physics in general, but I do know that in order to allow physics to play out as intended, PhysX physics (Rigidbody, etc.) are only enabled when you’re within a sphere of influence where a planetary body’s gravity will begin to affect you (i.e. close enough that it’s worth calculating) and, to some extent, all general physics are re-centered around the area you’re observing. No matter where in the solar system you’re observing, any direct Physics interactions will be made to occur close to (0, 0, 0), where floating point accuracy is at its highest.

On that note, I’m not certain exactly how they handle some details, but their planets are surely NOT a single Collider each. They would almost definitely have stitched together nearby regions (in part to only need to show a little bit at a time for RAM reasons, even).

The short version of this is that using full-scale sizes as-is won’t end well. A value of ~6,400,000 should be at a point (if I’m remembering correctly) where floating point accuracy would already be down to somewhere between 1.0- and 0.1-unit changes at a minimum, which would have pretty catastrophic consequences for nearly all aspects of your game without even leaving the surface of that first planet.