diff options
author | Sergej Reich <sergej.reich@googlemail.com> | 2013-02-22 18:47:11 +0400 |
---|---|---|
committer | Sergej Reich <sergej.reich@googlemail.com> | 2013-02-22 18:47:11 +0400 |
commit | c586159438c036d6117016b49f3d727862d54662 (patch) | |
tree | 8456b6abdcbf740bac7f226632d4bdea0c1da2f5 /source/gameengine/Physics/Bullet | |
parent | 4df5b943edeb7bb65a5b19c6130e1959966c2878 (diff) |
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.
Diffstat (limited to 'source/gameengine/Physics/Bullet')
-rw-r--r-- | source/gameengine/Physics/Bullet/CcdPhysicsController.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp index ef43e094e6d..81b9bd0d5cc 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp @@ -24,7 +24,6 @@ subject to the following restrictions: #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 @@ subject to the following restrictions: #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 @@ btCollisionShape* CcdShapeConstructionInfo::CreateBulletShape(btScalar margin, b 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 |