Springare
18-12-2007 16:20:51
Hi im working on a game projekt whit my friend and wanna use a mesh from 3smax that we have exported to ogres .mesh file format. the problem is all object just fall straight trought and lands on the floor under the mesh.
and here is the code im using to initialize the NxOgre and make a ogrehead dummy:
and the code im using for the level is:
please, is there anyone who can help me and find the error?
//Springare
and here is the code im using to initialize the NxOgre and make a ogrehead dummy:
World *pPhysicWorld = new World("log: html, framelistner: yes");
Scene *pNxScene = pPhysicWorld->createScene("WorldScene", mSceneMgr, "gravity: yes, floor: yes");
Body *pBody = pNxScene->createBody("OgreHead.mesh", new CubeShape(0.5f), Vector3(0.0f,1000.0f,0.0f), "mass: 500");
m_pLevel = new Level();
if(m_pLevel != NULL)
m_pLevel->Initialize("Level01", pNxScene);
and the code im using for the level is:
bool Level::Initialize(Ogre::String sLevelName, Scene* pNxScene)
{
m_pNxScene = pNxScene;
m_sLevelName = sLevelName;
m_sMeshName = sLevelName + ".mesh";
Body *pBody = m_pNxScene->createBody(m_sMeshName, new TriangleMeshShape(m_sMeshName), Vector3(0.0f, 0.0f, 0.0f), "static: yes");
return true;
}
please, is there anyone who can help me and find the error?
//Springare