Vector3 (float,float,float) stops increasing at 1.677722E+07 why?

Hi,

I am writing a space simulator and need to store the players position in a bunch of Vector3 objects, which make, put together, the absolute position of the player.

public class Position {
	private string UUID = System.Guid.NewGuid().ToString();
	// Measures. Distance to central origin. Values depend on each other.
	// 1 meterDistance = 1 unit
	// 1 kilometerDistance = 1000 meterDistance
	// 1 astronomicalDistance = 149597870.700f kilometerDistance
	// 1 lightyearDistance = 63241.077f astronomicalDistance
	public Vector3 meterDistance;
	public Vector3 kilometerDistance;
	public Vector3 astronomicalDistance; 
	public Vector3 lightyearDistance;
}

In a main thread I update the players position regularly. The meter value is increased by the velocity of the player, and I then check if I need to update the positions.
My issue is. The code works, but only if the kilometerDistance Vector3 reaches a value of 1.677722E+07 then it suddenly stops. I cannot make out why, shouldnt the float value be able to get higher?!

I need to reach 149597870 in the float to be able to use my position system based on kilometer and astronomicalunit (which is 149597870 km).
Thanks a lot for any hint!!

void Update () {
		//Update the players position (the position within the higher position grid)
		positionPlayer.meterDistance = positionPlayer.meterDistance + (_cacheRigidbody.velocity + this.referenceFrameVelocity)*Time.deltaTime;

		// Update the kilometerDistance vector after meterDistance vector reaches +-1000 size
		// Update the astronomicalDistance vector after kilometerDistance vector reaches +-149597871 size
		// Update the lightyearDistance vector after astronomicalDistance vector reaches +-63241.077 size
		// Kilometer
		while (positionPlayer.meterDistance.x > 1000) {
			positionPlayer.kilometerDistance.x += 1;
			positionPlayer.meterDistance.x -= 1000;
		} 
		while (positionPlayer.meterDistance.x < -1000) {
			positionPlayer.kilometerDistance.x -= 1;
			positionPlayer.meterDistance.x += 1000;
		}
		while (positionPlayer.meterDistance.y > 1000) {
			positionPlayer.kilometerDistance.y += 1;
			positionPlayer.meterDistance.y -= 1000;
		} 
		while (positionPlayer.meterDistance.y < -1000) {
			positionPlayer.kilometerDistance.y -= 1;
			positionPlayer.meterDistance.y += 1000;
		}
		while (positionPlayer.meterDistance.z > 1000) {
			positionPlayer.kilometerDistance.z += 1;
			positionPlayer.meterDistance.z -= 1000;
		} 
		while (positionPlayer.meterDistance.z < -1000) {
			positionPlayer.kilometerDistance.z -= 1;
			positionPlayer.meterDistance.z += 1000;
		}
		// astronomicalDistance
		// TODO 149597870.7f would be one AE, but there seems to be a float issue to occur here. So thats current y14959787.07f (10th of an AE).
		while (positionPlayer.kilometerDistance.x > 149597870.7f) {
			positionPlayer.astronomicalDistance.x += 1;
			positionPlayer.kilometerDistance.x -= 149597870.7f;
		} 
		while (positionPlayer.kilometerDistance.x < -149597870.7f) {
			positionPlayer.astronomicalDistance.x -= 1;
			positionPlayer.kilometerDistance.x += 149597870.7f;
		}
		while (positionPlayer.kilometerDistance.y > 149597870.7f) {
			positionPlayer.astronomicalDistance.y += 1;
			positionPlayer.kilometerDistance.y -= 149597870.7f;
		} 
		while (positionPlayer.kilometerDistance.y < -149597870.7f) {
			positionPlayer.astronomicalDistance.y -= 1;
			positionPlayer.kilometerDistance.y += 149597870.7f;
		}
		while (positionPlayer.kilometerDistance.z > 149597870.7f) {
			positionPlayer.astronomicalDistance.z += 1;
			positionPlayer.kilometerDistance.z -= 149597870.7f;
		} 
		while (positionPlayer.kilometerDistance.z < -149597870.7f) {
			positionPlayer.astronomicalDistance.z -= 1;
			positionPlayer.kilometerDistance.z += 149597870.7f;
		}
		// lightyearDistance
		while (positionPlayer.astronomicalDistance.x > 63241.077f) {
			positionPlayer.lightyearDistance.x += 1;
			positionPlayer.astronomicalDistance.x -= 63241.077f;
		} 
		while (positionPlayer.astronomicalDistance.x < -63241.077f) {
			positionPlayer.lightyearDistance.x -= 1;
			positionPlayer.astronomicalDistance.x += 63241.077f;
		}
		while (positionPlayer.astronomicalDistance.y > 63241.077f) {
			positionPlayer.lightyearDistance.y += 1;
			positionPlayer.astronomicalDistance.y -= 163241.077f;
		} 
		while (positionPlayer.astronomicalDistance.y < -63241.077f) {
			positionPlayer.lightyearDistance.y -= 1;
			positionPlayer.astronomicalDistance.y += 163241.077f;
		}
		while (positionPlayer.astronomicalDistance.z > 63241.077f) {
			positionPlayer.lightyearDistance.z += 1;
			positionPlayer.astronomicalDistance.z -= 63241.077f;
		} 
		while (positionPlayer.astronomicalDistance.z < -63241.077f) {
			positionPlayer.lightyearDistance.z -= 1;
			positionPlayer.astronomicalDistance.z += 63241.077f;
		}

}

Single-precision floating point has limitations that prevent it from being useful for large numbers. You can’t feasibly use Vector3 by itself for a space simulation; in general it’s best not to exceed 10K units from the origin, maybe 100K if precision isn’t an issue.