drwhut / tabletop-club

An open-source platform for playing tabletop games in a physics-based 3D environment for Windows, macOS, and Linux! Made with the Godot Engine.
MIT License
1.24k stars 49 forks source link

Specify density instead of mass? #270

Closed GrimPixel closed 1 year ago

GrimPixel commented 1 year ago

Is your feature request related to a problem? Please describe. Each time it requires some efforts to calculate the mass, especially when the model is not cuboid or other easy-to-calculate shapes. It could be simply density everywhere instead, I think.

drwhut commented 1 year ago

The problem with that is, in order to calculate the mass using density, you need to know the volume of the object. If the object can be any shape, the volume is incredibly difficult to calculate. One could estimate the volume using a bounding box, but then you would not get accurate results for some objects. What I personally do for determining the mass of objects is find the same, or a similar object in real life, and put it on a set of scales. Even if it is not the exact same object, the resulting mass will generally be in the right ball park.