Return triangle index from collisions?

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Return triangle index from collisions?

Post by rogerborg »

At the moment, ISceneCollisionManager::getCollisionPoint() (and my new candidate method getSceneNodeAndCollisionPointFromRay()) return the triangle that has been hit, i.e. its vertex positions.

However, that doesn't tell you which triangle was hit. Would it be useful for anyone if these methods returned the index of the selected triangle instead as well as its vertex positions? I'm thinking in terms of working back to try and associate a collision with a particular part of the original mesh (e.g. headshots). I haven't really thought it through much further than that, and there's probably no point in adding it unless it would be useful to someone.

Any takers?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

I guess this would be useful and it shouldn't be too hard to implement as i assume that data is present when the collision point is found so you just need a parameter passed in to return it with.
Image Image Image
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I think there is a feature request on the sourceforge tracker for this. So thee are indeed people out there who'd like to have such things. I think that most people dealing with collision and stuff simply just switch to some physics engines, and hence no one ever cared for the methods in Irrlicht. There is also no one from the developers directly responsible for that part of Irrlicht. But we'll closely follow your suggestions and implementations :) Just keep on posting them with examples because that simplifies a lot :D
Post Reply