I have searched through the forum for a long time, but I don't quite get the exact solution to have an accurate collision detection between two SceneNodes.
Here's the problem:
The required collision detection is between the dagger and the alien. However, if I use the bounding box to check it, it is not accurate enough.
I've also tried to use the Bullet Physics Engine. But it doesn't seem to support the IAnimatedMeshSceneNode at all. So how should I solve it?
Maybe make a selector from the alien, and then either use an ellipse or a line to represent the knife? This might be kind of slow with a high poly mesh (which it looks like you have) though... Perhaps you could make boxes around bones you have (if you're using them) and then check the knife with all of those.
Well not exactly ragdoll technique as that really applies to the physics behind making a series of physics objects connected together, generally forming a skeleton of a human, basically go limp.
But it's the same sort of thing as you'd do with ragdolls, what Ion Dune suggested, by having bounding boxes for each individual part of the model and checking against those.
However you do it, using Irrlicht or a 3rd person engine, you'll need to get a bunch of triangles representing the current animation frame of the mesh.
If you're not using a skinned/skeletal mesh, then you can call IAnimatedMesh::getMesh(x) to get an IMesh, then create a triangle selector from it (and then use e.g. ISceneCollisionManager::getCollisionPoint()). It's inefficient - in that it re-allocs memory every time you create a selector - but there's currently no better method available.
If you're using new skeletal meshes, then you're pretty much boned (pun intended) as getMesh(x) currently isn't working for them.
Hi all,
I'm using my free time (I'm stuck with the beginning of my project) to read forum posts and learn more.
I had one idea, don't know if it is good: If you build an invisible alien copy only with bounding boxes and uses the same function to animate it, you could detect the collision on it, right?
Professional Software Developer and Amateur Game Designer
Yeah that would work too, that's sort of what i've done in my game for static meshes, make the physics collision boxes from a much lower poly mesh which is basically just a load of bounding boxes. This is often how it's done in the industry i believe as you don't need high poly for collision, just the basic shape.
And yeah i guess it would apply to animated models as well, if the very low poly version of your character was animated in exactly the same way then it should match up nicely.
But i guess the animation would have to be done in a modelling program rather than irrlicht.... it's basically the same thing as doing the way i initially mentioned, but apparently that won't currently work in irrlicht, but this way should!
I agree mastergod -- we need a ragdoll technology.
I have been looking for a triangle collision method for animated mesh for a while and it make me upset very much. But now I realize that I don't need it. We should attach each bone with a rigid geometric shape. This is the charming feature of the bone animation. So we can punch our enemy flying against the wall, and it crashes the wall.
I also think we can get the static mesh of animated skinned mesh, because every time we draw it, the mesh has been built in the buffer. We just get them out of that buffer.