It's my first time to post a question here and I'm very new in IrrLicht. I'm trying to make a collision detection between 3DS meshes, but I didn't sucess in this task. Below is the code. Some one can help to solve this? I believe my code is very simple. I'm accostumating with this guy.
Code: Select all
IAnimatedMesh * Mesh = Gerenciador->getMesh("modelo.3DS");
IAnimatedMesh * Mesh2 = Gerenciador->getMesh("modelo2.3DS");
ISceneNode * Mesh2Node = NULL;
//Mesh que espera colisão
Mesh2Node = Gerenciador->addOctTreeSceneNode(Mesh2->getMesh(0));
Mesh2Node->setPosition(vector3df(-5, 0, 0));
selector = Gerenciador->createOctTreeTriangleSelector(Mesh2->getMesh(0), Mesh2Node, 400);
Mesh2Node->setTriangleSelector(selector);
selector->drop();
NodoCena = Gerenciador->addAnimatedMeshSceneNode(Mesh);
NodoCena->setPosition(vector3df(5, 0, 0));
ISceneNodeAnimator * sceneAnimator = Gerenciador->createCollisionResponseAnimator(selector, NodoCena, vector3df(30,50,30), vector3df(0,0,0), vector3df(0,50,0));
NodoCena->addAnimator(sceneAnimator);
sceneAnimator->drop();
IGUIEnvironment * Ambiente = DeviceTeste->getGUIEnvironment();