Question about ITriangleSelector and animated models

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
Peter Müller
Posts: 292
Joined: Sun Mar 14, 2004 5:28 pm
Location: Germany
Contact:

Question about ITriangleSelector and animated models

Post by Peter Müller »

Hi there!
I've got an animated IAnimatedMeshSceneNode build upon an MD2 Model file (sydney.md2 ;)).

My question:
Do I have to create a new ITriangleSelector every frame, to get the exact collision position?
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer
Mindl
Posts: 16
Joined: Wed Jun 30, 2004 1:42 am

Post by Mindl »

I would think you only need to create the triangle selcetor for the model once and then use it to initialize a collision animator for the models IAnimatedMeshSceneNode. That should take care of the collision for that node every frame. Hope this helps.

-Mindl
thesmileman
Posts: 360
Joined: Tue Feb 10, 2004 2:20 am
Location: Lubbock, TX

Post by thesmileman »

This is a very good question. I think that the triangle selector holds the triangles only but the collision response animator keeps trace of how the triangles are moved rotated or otherwise modified as in an animation.

I know this is the case for objects which are moved and rotated, as a while back I did a school project in which I moved and rotated an object and an object collided with the moved and rotated trinagles in various positions. Whether or not this is true for animated meshes I am not sure but I would imagine so. Just do a test and create an animated box that moves far from its position and try to collided something with it at various points in the animation.
Peter Müller
Posts: 292
Joined: Sun Mar 14, 2004 5:28 pm
Location: Germany
Contact:

Post by Peter Müller »

Hmm, I checked the Irrlicht source, but I don't find the feature. Perhaps I should ask Niko...
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer
thesmileman
Posts: 360
Joined: Tue Feb 10, 2004 2:20 am
Location: Lubbock, TX

Post by thesmileman »

What both mindl and I are saying is that we are pretty sure it works without you doing anything special. Have you tried it to make sure? :D
Peter Müller
Posts: 292
Joined: Sun Mar 14, 2004 5:28 pm
Location: Germany
Contact:

Post by Peter Müller »

Not jet, but I'll do it today and then report you.
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

As far as I remember, I did not add something like that into the engine. But I think some time ago, someone posted an selector for this.
PeterM^LoggedOf

Post by PeterM^LoggedOf »

Thanks for answering, niko.
I'll go and serach :D
Post Reply