Qt Quick 3D Physics Units

When simulating physical objects you need to define a common frame of reference for all physical units. In Qt Quick 3D Physics all types are unit-less meaning you can define your world in centimeters, meters, inches or whatever you prefer as long as you are consistent. The important part is that all values used are based on the same units.

Default units

Despite the module being unit-less all physical properties have default values that are based on centimeters. This means that adding a sphere with diameter 1 would make it behave like it was 1 cm in diameter. To be compatible with Qt Quick 3D the default sizes of the built-in geometries are 100 cm. The default gravity is 981 which matches the gravity on earth in cm per square-second. The default density is 0.001 kilograms per cubic-centimeters i.e. 1000 kilogram per cubic-meter which is the density of fresh water at 4 °C.

Custom units

Using custom units is possible but you need to make sure all relevant properties are updated accordingly. Below is a table showing the equivalent values of some properties in both a meter and a centimeter based scale:

PropertyValue (cm)Value (m)
gravity9819.81
typicalLength1001
typicalSpeed100010
density0.0011000

If converting from a centimeter to a meter based scale then all the positions and dimensions of objects as well as impulses and forces would need to be scaled by a factor of 0.01.