Collision detection

jim13c

24-02-2009 15:34:52

We have a project at school where we have to create a game engine.

But I have a question. What's the best way to create a character, and especially, how do we make an accurate collision detection for those characters in stead of the bounding box. So we're looking for collision detection per limb.

In the Ogre directory are some sample meshes (robot.mesh,..) and some of them have a .skeleton file.
Do they have anything to do with it?

We're creating our characters with blender.

Thx

betajaen

24-02-2009 15:44:48

Have a look at the ragdoll code which will tell you how to create the various Actors/shapes from the bones. That should get you started.

jim13c

24-02-2009 15:58:21

I found that post already, but that requires an external file for each character with the position and form of the shapes.
Isn't there another way that doesn't require other input than the .mesh and .skeleton file?
Or is there a way to create that file automaticly?

jim13c

26-02-2009 20:43:28

Allright, i have collision detection working using a convex shape generated bij libflour.

Now my next question.
For complicated models ( human, ... ) this is not very accurate.
I've read you can generate this convex shapes per limb but can't find any examples.
Can you give me an example or guide me in the right direction on how to create convex shapes per limb ?

Thx

betajaen

27-02-2009 08:52:13

Generally you wouldn't use convex shapes for limbs. Capsules, spheres and cubes are more than accurate.

jim13c

27-02-2009 09:08:57

But how do I know wich form to use for a limb?
And is there a way to automaticly find the limbs and calculate the shape for it, or do i have to specify the shapes manually in a file ?

betajaen

27-02-2009 09:48:16

Shapes in a file usually.

I do remember there being something in the OgreODE (or possibly Gangsta) that did some sort of automatic ragdoll creation. It would obviously be written for ODE, but converting over to PhysX isn't that difficult.

There has also been a few posts about ragdolls in forum as well - with code.