explicitly deserialize btCapsuleShape date (margin, scaling, halfextents), because the API modifies them

This commit is contained in:
Erwin Coumans
2014-08-26 17:21:08 -07:00
parent a0778a1d49
commit 3c558ec995
6 changed files with 53 additions and 35 deletions

View File

@@ -443,7 +443,7 @@ void DemoApplication::keyboardCallback(unsigned char key, int x, int y)
m_debugMode |= btIDebugDraw::DBG_ProfileTimings;
break;
case '=':
case '\\':
{
int maxSerializeBufferSize = 1024*1024*5;
btDefaultSerializer* serializer = new btDefaultSerializer(maxSerializeBufferSize);

View File

@@ -14,7 +14,7 @@ void SerializeSetup::initPhysics(GraphicsPhysicsBridge& gfxBridge)
{
this->createEmptyDynamicsWorld();
gfxBridge.createPhysicsDebugDrawer(m_dynamicsWorld);
m_dynamicsWorld->getDebugDrawer()->setDebugMode(btIDebugDraw::DBG_DrawWireframe);
m_dynamicsWorld->getDebugDrawer()->setDebugMode(btIDebugDraw::DBG_DrawWireframe+btIDebugDraw::DBG_DrawContactPoints);
btBulletWorldImporter* importer = new btBulletWorldImporter(m_dynamicsWorld);
const char* someFileName="spider.bullet";