diff --git a/src/BulletCollision/CollisionDispatch/btCollisionObject.h b/src/BulletCollision/CollisionDispatch/btCollisionObject.h index 7ef3787b3..0961f3e75 100644 --- a/src/BulletCollision/CollisionDispatch/btCollisionObject.h +++ b/src/BulletCollision/CollisionDispatch/btCollisionObject.h @@ -143,7 +143,7 @@ public: virtual ~btCollisionObject(); - void setCollisionShape(btCollisionShape* collisionShape) + virtual void setCollisionShape(btCollisionShape* collisionShape) { m_collisionShape = collisionShape; m_rootCollisionShape = collisionShape; diff --git a/src/BulletSoftBody/btSoftBody.cpp b/src/BulletSoftBody/btSoftBody.cpp index 832a697bf..4620001eb 100644 --- a/src/BulletSoftBody/btSoftBody.cpp +++ b/src/BulletSoftBody/btSoftBody.cpp @@ -69,7 +69,7 @@ btSoftBody::btSoftBody(btSoftBodyWorldInfo* worldInfo,int node_count, const btV pm->m_flags = fMaterial::Default; /* Collision shape */ ///for now, create a collision shape internally - setCollisionShape(new btSoftBodyCollisionShape(this)); + m_collisionShape = new btSoftBodyCollisionShape(this); m_collisionShape->setMargin(0.25); /* Nodes */ const btScalar margin=getCollisionShape()->getMargin(); diff --git a/src/BulletSoftBody/btSoftBody.h b/src/BulletSoftBody/btSoftBody.h index 3f0e75eae..5f4942be6 100644 --- a/src/BulletSoftBody/btSoftBody.h +++ b/src/BulletSoftBody/btSoftBody.h @@ -606,6 +606,13 @@ public: /* dtor */ virtual ~btSoftBody(); /* Check for existing link */ + + + virtual void setCollisionShape(btCollisionShape* collisionShape) + { + //don't do anything, due to the internal shape hack: todo: fix this + } + bool checkLink( int node0, int node1) const; bool checkLink( const Node* node0, diff --git a/src/BulletSoftBody/btSoftBodyInternals.h b/src/BulletSoftBody/btSoftBodyInternals.h index 7466bdb4c..eb3ee9037 100644 --- a/src/BulletSoftBody/btSoftBodyInternals.h +++ b/src/BulletSoftBody/btSoftBodyInternals.h @@ -94,7 +94,6 @@ public: virtual void setLocalScaling(const btVector3& /*scaling*/) { ///na - btAssert(0); } virtual const btVector3& getLocalScaling() const {