createOctTreeTriangleSelector

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
pedro
Posts: 5
Joined: Fri Jul 14, 2006 2:10 pm

createOctTreeTriangleSelector

Post by pedro »

ok! now i am using x file, and i can load the x file but the collision don't function, i have ride this code:


//Add mesh
scene::IAnimatedMesh* mesh = smgr->getMesh("../../media/media2/imagens/santal6.x");
scene::ISceneNode* meshNode =smgr>addOctTreeSceneNode(mesh>getMesh(0), 0, 128);
meshNode->setPosition(core::vector3df(0,0,0));


//Add camera
scene::ICameraSceneNode* camera =
smgr->addCameraSceneNodeFPS(0, 100.0f, 300.0f, -1, 0, 0, true);
camera->setPosition(core::vector3df(0,20,-30));


//Set collision
scene::ITriangleSelector* selector = smgr->createOctTreeTriangleSelector(mesh->getMesh(0), meshNode, 128);
scene::ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator(selector, camera, core::vector3df(60,100,60), core::vector3df(0,0,0), core::vector3df(0,50,0), 0.0005f);
camera->addAnimator(anim);

what is wrong on this code?
you can help me?
thanks!
Post Reply