this is my first Message in this forum. First I am not English (german) and my english is terrible I am just learning it (I'm 14) i hope you will hlep me altough. My problem is:
I wrtoe a little game in Irrlicht and i've a problem with the collision when I load a x mesh file it works but i want to use a 3ds file. I think the problem is near my TriangleSelector because when i use 3ds there is konw messag like " Needed 0ms to create OctTreeTriangleSelector.(13 nodes, 1024 polys)" . Here is my code:
Code: Select all
//Map laden
scene::IAnimatedMesh* Terrain1 = smgr->getMesh("./media/terrain1.x");
scene::IAnimatedMeshSceneNode* Terrain1_node = smgr->addAnimatedMeshSceneNode(Terrain1);
scene::ITriangleSelector* selector = 0;
scene::ITriangleSelector* selector2 = 0;
//Map eigenschafte
if (Terrain1_node)
{
Terrain1_node->setPosition(core::vector3df(100,100,100));
Terrain1_node->setScale(core::vector3df(50.f,50.f,50.f));
selector = smgr->createOctTreeTriangleSelector(Terrain1,Terrain1_node, 64);
scene::IMetaTriangleSelector * selector2 = smgr->createMetaTriangleSelector();
selector2->addTriangleSelector(selector);
selector->drop();
Terrain1_node->setMaterialFlag(video::EMF_LIGHTING, false);
// Terrain1_node->setMaterialTexture(0, driver->getTexture("../../media/terrain-texture.jpg"));
// Terrain1_node->setMaterialTexture(1, driver->getTexture("../../media/detailmap3.jpg"));
// Terrain1_node->setMaterialType(video::EMT_DETAIL_MAP);
//Kolision
scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(
selector2, camera, core::vector3df(30,10,20),
core::vector3df(0,0,0),
core::vector3df(0,0,0));
selector2->drop();
M.Irr