Skip to content

Scale Multiplier at Beginning of Calculation #75

@cassiussa

Description

@cassiussa

Since doubles only have 15 digits of significance, we can still run out of "space" if we use a positional base measurement of meters. If we were to, instead, assume within Unity that 1 Unit = 1 Megameter in space, we can shift the position coordinate figures by 6 digits to the right.

So Earth, which is approximately 13,000km (13,000,000u) in diameter and therefore originally have a value of 13 Megameters, would become just 13u. This would then shrink numbers to the point where the smallest movement in a Unity Vector3 (float) would be at the limits of usability. For example, a 1m (1u) wide object converts to 0.000001u, which is at 7 digits of significance. We can of course still calculate smaller numbers with accuracy as calculations are performed on doubles, but visually we cannot.

If we are to convert during the position calculation process within the SphericalToCartesianCoords() method in the Maths class, we should be able to minimize impact. We can likely do this by dividing the figures by the megameter static double variable's value.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions