[Bf-blender-cvs] [b5834d3] fracture_modifier: fix for dynafrac, disallow passive objects as triggers again (to avoid the ground being a trigger)

Martin Felke noreply at git.blender.org
Fri Oct 7 22:45:39 CEST 2016


Commit: b5834d39ac2ef8eade241f14e20728fa99e3dbea
Author: Martin Felke
Date:   Fri Oct 7 22:45:31 2016 +0200
Branches: fracture_modifier
https://developer.blender.org/rBb5834d39ac2ef8eade241f14e20728fa99e3dbea

fix for dynafrac, disallow passive objects as triggers again (to avoid the ground being a trigger)

===================================================================

M	source/blender/blenkernel/intern/rigidbody.c

===================================================================

diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index 528f497..e87252e 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -2150,9 +2150,9 @@ static void check_fracture(rbContactPoint* cp, RigidBodyWorld *rbw)
 					if (s) {
 						float size[3];
 
-						if (ob1 == ob2) {
+						if (ob1 == ob2 || (ob2->rigidbody_object && ob1->rigidbody_object->type == RBO_TYPE_PASSIVE)) {
 							//todo calculate shard...
-							size[0] = size[1] = size[2] = force;
+							size[0] = size[1] = size[2] = -1.0f;
 						}
 						else {
 							BKE_object_dimensions_get(ob2, size);
@@ -2197,8 +2197,8 @@ static void check_fracture(rbContactPoint* cp, RigidBodyWorld *rbw)
 					if (s) {
 						float size[3];
 
-						if (ob1 == ob2) {
-							size[0] = size[1] = size[2] = force;
+						if (ob1 == ob2 || (ob1->rigidbody_object && ob1->rigidbody_object->type == RBO_TYPE_PASSIVE)) {
+							size[0] = size[1] = size[2] = -1.0f;
 						}
 						else {
 							BKE_object_dimensions_get(ob1, size);




More information about the Bf-blender-cvs mailing list