Fix T54293: calculate mass does not take object scale into account

This commit is contained in:
Jacques Lucke 2020-09-15 12:43:00 +02:00
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
1 changed files with 2 additions and 0 deletions

View File

@ -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 {