Collision and mesh

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
cyberbobjr
Posts: 64
Joined: Mon Sep 08, 2003 8:21 am
Location: Paris, France

Collision and mesh

Post by cyberbobjr »

Hi all,
Just an easy question :
How can we use CollisionManager (getCollisionPoint for example) to determine the exact point of collision on a mesh for doing damage localisation (legs, heads, etc.) ?
Someone have an idea ?
Thanks for all !
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

For static meshes, just do it like in the collision tutorial.
But there is no fast exact collision test possible for animated meshes yet. Only bounding box test is possible. But if you want to program your own collision test, just do it, it wont be difficult I think.
cyberbobjr
Posts: 64
Joined: Mon Sep 08, 2003 8:21 am
Location: Paris, France

Post by cyberbobjr »

thanks for your answer !
From your mind, it is possible to use "ITriangleSelector::getTriangles" in this case ?
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

You mean with static meshes? No problem, just like in the tutorial.
For animated meshes: Also possible, but you've got to make it somehow possible to update the triangles in the triangle selector. This is what is missing for doing triangle based collision detection with animated meshes.
cyberbobjr
Posts: 64
Joined: Mon Sep 08, 2003 8:21 am
Location: Paris, France

Post by cyberbobjr »

with getMS3DJointNode i can get the bounding box of some joints (with milkshape models), with this bounding box i'll can check the ray and do localized damage :D
Post Reply