AntonSynytsia / MSPhysics

A NewtonDynamics wrapper for SketchUp.
http://sketchucation.com/forums/viewtopic.php?f=323&t=56852#p516427
MIT License
55 stars 20 forks source link

Mass by density seems to ignore volume #13

Closed MrPrezident closed 5 years ago

MrPrezident commented 5 years ago

If I change the volume of an object without changing its size (e.g. by cutting an hole in it), I can see that the volume changes as shown in "entity info," but the mass does not change. i.e. two objects with the same size and mass density, but different volume, weight the same. Is this a bug? or is this expected? How is the mass calculated? I would think it should be mass = mass density x volume.

AntonSynytsia commented 5 years ago

All groups/components are first wrapped into convex shapes and then their volume is computed. MSPhysics does not support movable concave shapes. You must manually convert them to convex, that is distribute into convex groups. This explains why drilling a hole doesn't change physics properties. If you enable "collision wireframe", you will see that concave parts are wrapped around.

MrPrezident commented 5 years ago

I'm trying to adjust the center of mass / moment of inertia of a juggling club so that it is more realistic. This is what the inside of an actual club looks like: https://s.hswstatic.com/gif/juggling-19.jpg. It's basically hollow. The physics aren't quite the same when modeling it as a solid with uniform density. Is there a way to make the physics more realistic here? Also, the club is made out of different parts that have vastly different coefficient of friction etc. Is there a way to set different physics properties for different parts of the same object?