chandlerprall / Physijs

Physics plugin for Three.js
MIT License
2.77k stars 455 forks source link

Unit system #241

Open jgrizou opened 9 years ago

jgrizou commented 9 years ago

I could not find information about the unit system used in Physijs.

A new THREE.SphereGeometry(20, 32, 32) has a mass of about 33510. It look heavy :) but does it correspong to any unit? If I load an STl file of a real object, of a known mass in the real world of say 100g, what should I enter as mass for the object?

The same applies to gravity, setting it to new THREE.Vector3( 0, -9.81, 0 ) makes movements very slow. I guess it is not expressed in m/s2? Any hints?

speculees commented 8 years ago

As taken from http://www.bulletphysics.org/mediawiki-1.5.8/index.php?title=Frequently_Asked_Questions

Bullet just works with numbers so in principle you can use any units you want. If you do deviate from these units you need to be aware that there are interdependencies between e.g. lengths and torques so you should know a bit about mechanics in general before proceeding.

The most common units people use are: Measure length in meters. Measure time in seconds. Measure mass in kilograms. Measure force in newtons.