- Home /
Composite Rigidbodies - Mass Distribution
Summary:
Is it possible to control the mass distribution of a composite rigidbody?
Detail:
When creating a composite rigidbody a parent object is used e.g.
Hammer - has component rigidbody |_ Handle - has component mesh collider |_ Head - has component mesh collider
I would like to be able to specify the mass of the handle and the head separately such that the handle is light (made from wood) and the head is heavy (made from iron).
As far as I understand the mass property, specified on the rigidbody, is uniformly distributed across the mesh volumes. Is there a way to specify it at the child level? Is this as simple as adding an inactive rigidbody to the child objects?
The only other approach I can think of is to have each mesh have it's own rigidbody and then use fixed constraints to attach the objects together. I haven't tested this thoroughly yet but I wouldn't expect it to scale well with high numbers of objects.
Thanks,
Ranom
I did a little bit more digging in the PhysX documentation and found the following info on $$anonymous$$assFX used in the library.
This seems to suggest that a sub mesh can have a different physics material which can have it's own mass/density values. Not sure if this is exposed in Unity3D though.
Ok, after trying this out in Unity3D, I see that you cannot deactivate a Rigidbody on an object so my first suggestion isn't possible.
Also there's no mass/density properties exposed on physics material.