# What float unit should I choose for 1 [m]?

This topic is 2097 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi

What unit should I choose for 1 [m], what value is the best? For example I have a football mesh. In reality the radius of the ball is about 11 cm (0,11m). Here on the screen:

http://imagizer.imageshack.us/v2/800x600q90/855/m2z1.jpg

the radius is 0,70 (I have float variable in which I store 0.70f). So this makes that in my game 0,70 [unit] means 0.11 [m], so 1 [m] is in fact 6,3636 units in my game.

I would like to scale my mesh and choose the scale of the world that 1 [m] = 1 [unit]. Without this there are some issues with physic. So from physic engine and generally logical point of view it would be the best to choose 1[m] as 1[unit], so radius float 0.11f means 0.11 [m]. However You know floats numbers have inacurracies, so is it good to choose 1[m] as 1[unit] or maybe better choice would be 1[m] as 100[unit]??? What is the best scale of the game environment?

Edited by anders211

##### Share on other sites

for a football game 1 unit = 1m is a good scale. (players would then be up to 2 units high and the field itself is a bit over 100 units long)

##### Share on other sites

The floating point precision is relative, not absolute, so you have the same relative resolution at any scale. Base your decision on what makes sense for you, but sticking to standard units is a good decision.

##### Share on other sites

OK, thanks for help

##### Share on other sites

Just a note - Sticking to standard units is especially good once you get into physics parts, otherwise you might need some multiplications-by-constant to do it correctly (and this can become bloody mess quite soon).

Edited by Vilem Otte

• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 18
• 12
• 9
• 9
• 25