Skip to content
Jigwright
HullForge docs

Set Physics Body Mass

Override a body's mass in kilograms, and verify by reading it back off the body. This is the remedy for a mass ratio the solver cannot hold, and the direction matters: raise the LIGHT body rather than lowering the heavy one, because a ragdoll's total mass should stay roughly the character's. Pass clear to drop the override and go back to computing mass from shape volume.

hf_set_physics_body_massWrite

Arguments

NameTypeDescription
assetreqstringPhysics asset path.
bonereqstringBone the body is on.
clearboolean
= false
Remove the override so mass is computed from shape volume again.
forceboolean
= false
Edit even when the asset cannot currently be saved - for example when revision control is configured but disconnected. The change will be made in memory and WILL BE LOST unless the underlying problem is fixed before saving. Only pass this if you intend to discard the work or fix the connection first.
mass_kgnumberNew mass in kilograms. A human hand is about 0.5, a forearm about 1.5, a torso about 30. Ignored when clear is true.

Nearby in Physics assets: