Destructible objects via fixed joints

NoMonkey

06-11-2012 09:15:53

Hello,
I'm trying to have a destructible wall in my project. My plan is the to fracture the wall model in a Blender, then load the fractures in Ogre and use a fixed joint to keep them together. Is this the right way to do it?
I tried this code. The two boxes are created just fine and they stick together but when i aply force (by manually adding force or by throwing something at them) the joint won't break. Am I missing something?

Critter::BodyDescription bodyDescription;
bodyDescription.mMass = 20.0f;
Critter::Body * a =mRenderSystem->createBody(NxOgre::BoxDescription(1,1,1), NxOgre::Vec3(1,1,1), "cube.1m.mesh");
Critter::Body * b =mRenderSystem->createBody(NxOgre::BoxDescription(1,1,1), NxOgre::Vec3(2,1.5,1), "cube.1m.mesh");
NxOgre::FixedJointDescription jointparams;
jointparams.mMaxForce = 1.0f;
jointparams.mMaxTorque = 1.0f;
mScene->createFixedJoint(a,b,jointparams);


And a third question. If this is the right way to to it I imagine it is very tedious work to load a whole fractured wall and join the parts together. Is there some program that could help somehow?