[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60308] branches/soc-2013-rigid_body_sim/ intern/rigidbody/rb_bullet_api.cpp: rigidbody: Only allow static-static collision when trigger is kinematic
Sergej Reich
sergej.reich at googlemail.com
Sun Sep 22 11:56:03 CEST 2013
Revision: 60308
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60308
Author: sergof
Date: 2013-09-22 09:56:03 +0000 (Sun, 22 Sep 2013)
Log Message:
-----------
rigidbody: Only allow static-static collision when trigger is kinematic
This way passive object don't activate passive objects when using
activation on collision.
Modified Paths:
--------------
branches/soc-2013-rigid_body_sim/intern/rigidbody/rb_bullet_api.cpp
Modified: branches/soc-2013-rigid_body_sim/intern/rigidbody/rb_bullet_api.cpp
===================================================================
--- branches/soc-2013-rigid_body_sim/intern/rigidbody/rb_bullet_api.cpp 2013-09-22 09:27:26 UTC (rev 60307)
+++ branches/soc-2013-rigid_body_sim/intern/rigidbody/rb_bullet_api.cpp 2013-09-22 09:56:03 UTC (rev 60308)
@@ -137,7 +137,11 @@
bool collides;
- if (rb0->suspended || rb1->suspended) { /* allow static-static collision so suspended bodies can be activated */
+ bool rb0_kinematic = ((btRigidBody *)proxy0->m_clientObject)->isKinematicObject();
+ bool rb1_kinematic = ((btRigidBody *)proxy1->m_clientObject)->isKinematicObject();
+
+ /* allow static-static collision so suspended bodies can be activated by kinematic objects */
+ if ((rb0->suspended && rb1_kinematic) || (rb1->suspended && rb0_kinematic)) {
collides = true;
}
else {
More information about the Bf-blender-cvs
mailing list