[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54757] trunk/blender/source/gameengine/ Physics/Bullet/CcdPhysicsController.cpp: game engine: Revert to using regular gimpact for mesh shapes
Sergej Reich
sergej.reich at googlemail.com
Fri Feb 22 15:47:11 CET 2013
Revision: 54757
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54757
Author: sergof
Date: 2013-02-22 14:47:11 +0000 (Fri, 22 Feb 2013)
Log Message:
-----------
game engine: Revert to using regular gimpact for mesh shapes
This reverts part of r53019.
While the compound shape trick works well in some cases, overall it's
much slower and even causes crashes under certain conditions.
We could make this and option and fix the crashes, but it's better to
implement convex decomposition anyway so just reverting for now.
Fixes [#34353] Ray cast on Triangle mesh bounded Rigid Body Object causes blender crash to desktop without error.
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53019
Modified Paths:
--------------
trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
Modified: trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
===================================================================
--- trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp 2013-02-22 14:12:55 UTC (rev 54756)
+++ trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp 2013-02-22 14:47:11 UTC (rev 54757)
@@ -24,7 +24,6 @@
#include "btBulletDynamicsCommon.h"
#include "BulletCollision/CollisionDispatch/btGhostObject.h"
#include "BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h"
-#include "BulletCollision/Gimpact/btCompoundFromGimpact.h"
#include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h"
#include "PHY_IMotionState.h"
@@ -37,7 +36,6 @@
#include "BulletSoftBody/btSoftBodyHelpers.h"
#include "LinearMath/btConvexHull.h"
#include "BulletCollision/Gimpact/btGImpactShape.h"
-#include "BulletCollision/Gimpact/btGImpactShape.h"
#include "BulletSoftBody/btSoftRigidDynamicsWorld.h"
@@ -2232,13 +2230,7 @@
btGImpactMeshShape* gimpactShape = new btGImpactMeshShape(indexVertexArrays);
gimpactShape->setMargin(margin);
gimpactShape->updateBound();
-
- //the depth value is how far along the triangle normal, the centroid is moved inwards
- //to create surface tetrahedra for the btCompoundShape
- //would be nice to expose this in the Blender user interfaceb
- btScalar depth=btScalar(0.2);
- collisionShape = btCreateCompoundFromGimpactShape(gimpactShape,depth);
- delete gimpactShape;
+ collisionShape = gimpactShape;
} else
More information about the Bf-blender-cvs
mailing list