ODE Physics: How to set up a character?

Hey guys,

I am a bit of a noob when it comes to Panda3d, ODE and python, but the game I am creating is coming along swiftly in the art department as thats where my skills lay.

Synopsis: I wish to have an ODE Body/Geom Physics based character which can dynamically collide with a ball (It is a soccer game). To do this I will need collision boxes/tubes/(or even better a mesh) to dynamically move with the animated bones.

My idea: To grab the position of the actor’s bone (which I can not find) and dynamically (using a looping task) set the position and of the collision box to the position of this bone. e.g. the calf bone will have a respective calf collision box that moves at the same time

The problem: Currently the collision box stays in the same place of which it was first spawned so it seems that the bones do not actually follow the rendered mesh.

Any help would be appreciated, perhaps this scheme could be scrapped for a more effecient approach.

Thanks

Do you mean the ball is a ODE body and the animated character’s leg is a ODE geom only ?

The character’s leg is a body/Geom, I basically copied from the ODE tutorial to create the ball bounce off the floor and set up the character in the same manner.

Usually you have to give the control of your rigid body/objects to ODE and let the physics engine determine its movement accordingly. To use ODE on a character, I don’t think it is possible to do it in realtime on a PC if you are going to simulate the joints with ODE. You need more tricks to make it work for your game.

It may worth to take a look on some more simple ODE examples:

The ODE car example
discourse.panda3d.org/viewtopic.php?t=5381

The Ragdol plant.

And also some simple examples in demomaster.

and since you’re talking about balls, check this out too