Use TriangleSelector for more than one SceneNode?

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
Stefan
Posts: 3
Joined: Sat Jul 28, 2007 8:42 am

Use TriangleSelector for more than one SceneNode?

Post by Stefan »

Hi, I am new to Irrlicht.

I have a few SceneNodes which use all the same mesh.
Now I want to use only one TriangleSelector (to do picking) for these SceneNodes.
Is it possible to do this, or do I need a TriangleSelector for every SceneNode?

regards,
Stefan
BAnd
Posts: 12
Joined: Fri Jul 06, 2007 5:58 pm

Post by BAnd »

You will need a triangle selector for every mesh and use a MetaTriangle Selector:

Code: Select all

// create metaSelector
         scene::IMetaTriangleSelector* metaSelector; 
         metaSelector = smgr->createMetaTriangleSelector();
and then make the triangle selector and use:

Code: Select all

         metaSelector->addTriangleSelector(mesh);
Post Reply