collision list

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
jidijaat
Posts: 7
Joined: Tue Mar 31, 2009 7:33 pm

collision list

Post by jidijaat »

how can i get all the scene node that are intersected by the ray .
irrlicth is only returning the nearest one.
CuteAlien
Admin
Posts: 10032
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

The ITriangleSelector interface has a function for (getTriangles): http://irrlicht.sourceforge.net/docu/cl ... ector.html

But I'm not sure about the documentation right now. It says:
This returns all triangles for one scene node associated with this selector. If there is more than one scene node associated (e.g. for an IMetaTriangleSelector) this this function may be called multiple times to retrieve all triangles.
But I just took a quick view at the code and it seems to me rather like IMetaTriangleSelector doesn't need to be called multiple times, but will return all triangles with one call and then getSceneNodeForTriangle could be called for each returned index. Unless I'm missing here something (could be, I have no time to dig deeper right now) the documentation here is wrong.

Also doesn't seem that fast.... I guess if speed is of importance I would start coding custom routines there.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply