help converting IMesh node to IAnimatedMeshSceneNode node

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
kennypu666
Posts: 26
Joined: Thu Apr 26, 2007 6:57 am

help converting IMesh node to IAnimatedMeshSceneNode node

Post by kennypu666 »

hi, the title says it all, but I need help on converting a IMesh to a IAnimatedMeshSceneNode. I know its a very nooby question but I need help.

the code i need help with is here:

Code: Select all

             IMesh* roommesh = smgr->getMesh(roommesh_name.c_str())->getMesh(0);

            ITriangleSelector* field1_selector = smgr->createOctTreeTriangleSelector( roommesh,roommesh_node,128);
             roommesh_node->setTriangleSelector(field1_selector);
             field1_selector->drop();
roommesh_node is a octtree, but since I loaded it from a .irr file, and the 1st parameter of createOctTree() would be wrong since roommesh isn't a AnimatedMeshSceneNode. can any one help me? thanks in advance,
Ken
Post Reply