Code: Select all
IMeshSceneNode* node;
IAnimatedMesh* mesh;
ITriangleSelector* selector;
this->mesh = smgr->getMesh("media/cube_Grey.obj");
this->mesh->getMesh(0)->setHardwareMappingHint(EHM_STATIC);
this->node = smgr->addOctreeSceneNode(this->mesh->getMesh(0));
if (this->node)
{
this->node->setPosition(vector3df(50,500,50));
this->selector = smgr->createOctreeTriangleSelector(this->mesh->getMesh(0), this->node, 128);
this->node->setTriangleSelector(this->selector);
}
if(metaSelector)
metaSelector->addTriangleSelector(this->selector);
If you want I can upload my program and you can try it for yourself.