IPhysic problem part 2
Posted: Wed Mar 28, 2007 1:37 pm
Hi,
I was having problem in introducing iphysics in my program but now that ok. thank to the forum. But now im getting another problem. My program compile well no errors... but when it initialised it stuck on this line
my mesh is a static mesh created with 3DS max 8 export to ".obj" with some texture the i use irredit for a better lookin of theenvironment .THe name I've give to the mesh in irrEdit is "city" . then the code continues for some collision stuff. The code are as follows:
Someone with any solution??
I was having problem in introducing iphysics in my program but now that ok. thank to the forum. But now im getting another problem. My program compile well no errors... but when it initialised it stuck on this line
Code: Select all
IPhysicsEntity* levelEntity = physics.addEntity(&level);
Code: Select all
smgr->loadScene("media/town.irr");
scene_node = smgr->getSceneNodeFromName("city");
if(scene_node->getType()==ESNT_MESH)
{
IAttributes* attribs = device->getFileSystem()->createEmptyAttributes();
if (attribs)
{
scene_node->serializeAttributes(attribs);
// get the mesh name out
core::stringc mesh_name = attribs->getAttributeAsString("Mesh");
const c8 *meshName = mesh_name.c_str();
attribs->drop();
// get a mesh from the name
IAnimatedMesh* town_mesh = smgr->getMesh(meshName);
IAnimatedMeshSceneNode* levelnode = smgr->addAnimatedMeshSceneNode(town_mesh);
SPhysicsStaticMesh level;
level.mesh = town_mesh;
level.meshnode = levelnode;
level.meshScale = vector3df(0.1f, 0.1f, 0.10f);
level.meshnode->setScale(level.meshScale);
IPhysicsEntity* levelEntity = physics.addEntity(&level);
}
}