[ODE] keyframe character animation link to a ragdoll

Roel van Dijk roelvandijk at home.nl
Wed Feb 11 21:50:14 MST 2004


On Wednesday 18 February 2004 06:15, Samuel Girardin wrote:
> I 've read something in the ode doc about a joint callback to have access
> to the forces apply by joint on connected bodies...
>
> Is someone succed  to implement this thing, I 'm sure this the right 
> method for my poblem.
> It  would be cool if someone could tell me how work  this joint call back,
> I will appreciate a little exemple for one joint... (-:
I think you mean the dJointFeedback struct. But it doesn't give you access to 
the forces. It's only a copy of the forces on the joint.

You use it like this:
// The feedback structure, it's up to you to do the allocation
dJointFeedback *feedback = new dJointFeedback;
// Create a joint called someJoint
dJointID someJoint;
// Attach the feedback structure to the joint
dJointSetFeedback(somejoint, &feedback);
// Step the world
...
// Somewhere else in your code
dJointFeedback *f = dJointGetFeedback(someJoint);
// Now you can read the forces on the joint from the feedback structure 'f'


More information about the ODE mailing list