Danny. To move a ragdoll I move the head and then cycle through all the component objects and move them the same displacement (head's new positon - head's old position). I move the joints the same amount.
Rotating limbs gets a lot more tricky. It should be possible to create joint handlers that rotate joints based on an objects position (think a sphere placed at each joint that you can click and drag).
The tricky bit with ragdolls is keeping the object and joint alignments in sync when you want to save their posture. Object's rotation and positon is taken from the centre, while joints are at the end. If you think of a thigh bone (cube) hanging straight down, to rotate it so it sticks 90 degrees forwards, the joint at the hip is rotated 90 degrees easy enough. But the thigh cube is rotated 90 degrees AND moved up and out. If you just rotate the thigh cube it'll be all wrong. Hence for ragdolls there's cases where you need to destroy and rebuild the whole jointed model.
I haven't totally mastered joints. If I create a seesaw with motor forces so it spins around, I can move the seesaw and reposition the joint. eg. If I create a box (20,2,70) in size at (0,100,0) with a hinge joint at (0,0,0) on the x axis, with forces, it spins fine. If I then set the box's position to (30,100,0) and the joint's position to (30,100,0), the joint goes mental. I hack a workaround by saving the object and joint's new positions and then rebuilding the scene.
I haven't identified the cause of the problem. Checking the joint and body positons with dJoint...() and dBody...() functions show they align. As I've a workable solution for my needs I haven't looked further into it.
Rotating limbs gets a lot more tricky. It should be possible to create joint handlers that rotate joints based on an objects position (think a sphere placed at each joint that you can click and drag).
The tricky bit with ragdolls is keeping the object and joint alignments in sync when you want to save their posture. Object's rotation and positon is taken from the centre, while joints are at the end. If you think of a thigh bone (cube) hanging straight down, to rotate it so it sticks 90 degrees forwards, the joint at the hip is rotated 90 degrees easy enough. But the thigh cube is rotated 90 degrees AND moved up and out. If you just rotate the thigh cube it'll be all wrong. Hence for ragdolls there's cases where you need to destroy and rebuild the whole jointed model.
I haven't totally mastered joints. If I create a seesaw with motor forces so it spins around, I can move the seesaw and reposition the joint. eg. If I create a box (20,2,70) in size at (0,100,0) with a hinge joint at (0,0,0) on the x axis, with forces, it spins fine. If I then set the box's position to (30,100,0) and the joint's position to (30,100,0), the joint goes mental. I hack a workaround by saving the object and joint's new positions and then rebuilding the scene.
I haven't identified the cause of the problem. Checking the joint and body positons with dJoint...() and dBody...() functions show they align. As I've a workable solution for my needs I haven't looked further into it.