[Bf-blender-cvs] [92dbf1c] fracture_modifier: forgot to calculate volume of whole object in mass calculation, leading to each shard having the same mass
Martin Felke
noreply at git.blender.org
Fri Oct 10 10:44:15 CEST 2014
Commit: 92dbf1c9da1356ef042a8e786463ec461d55b53a
Author: Martin Felke
Date: Fri Oct 10 10:43:57 2014 +0200
Branches: fracture_modifier
https://developer.blender.org/rB92dbf1c9da1356ef042a8e786463ec461d55b53a
forgot to calculate volume of whole object in mass calculation, leading to each shard having the same mass
===================================================================
M source/blender/blenkernel/intern/rigidbody.c
===================================================================
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index 02d39ad..0109fe8 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -309,6 +309,10 @@ void BKE_rigidbody_calc_shard_mass(Object *ob, MeshIsland *mi, DerivedMesh *orig
vol_ob = dim[0] * dim[1] * dim[2];
}
}
+ else
+ {
+ vol_ob = BKE_rigidbody_calc_volume(dm_ob, ob->rigidbody_object);
+ }
mass_ob = ob->rigidbody_object->mass;
@@ -1143,7 +1147,7 @@ void BKE_rigidbody_validate_sim_shard(RigidBodyWorld *rbw, MeshIsland *mi, Objec
/* --------------------- */
/**
-/* Create physics sim representation of object given RigidBody settings
+ * Create physics sim representation of object given RigidBody settings
*
* < rebuild: even if an instance already exists, replace it
*/
More information about the Bf-blender-cvs
mailing list