Fix T54293: calculate mass does not take object scale into account
This commit is contained in:
parent
7b66c719ae
commit
271f64e358
Notes:
blender-bot
2023-02-14 09:24:53 +01:00
Referenced by issue #54293, Calculate Mass does not take object scaling into account
|
@ -708,6 +708,8 @@ void BKE_rigidbody_calc_volume(Object *ob, float *r_vol)
|
|||
|
||||
if (totvert > 0 && tottri > 0) {
|
||||
BKE_mesh_calc_volume(mvert, totvert, lt, tottri, mloop, &volume, NULL);
|
||||
const float volume_scale = mat4_to_volume_scale(ob->obmat);
|
||||
volume *= fabsf(volume_scale);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue